From e9bfa5fe7942b1c8143c0a230c41a5b9ae90cabd Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 22 Jan 2015 15:25:41 +0100 Subject: [PATCH] luci-lib-ip: fix routes() for non-callback invocations Signed-off-by: Jo-Philipp Wich --- libs/luci-lib-ip/src/ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/luci-lib-ip/src/ip.c b/libs/luci-lib-ip/src/ip.c index 66ecb567e..403ffbd05 100644 --- a/libs/luci-lib-ip/src/ip.c +++ b/libs/luci-lib-ip/src/ip.c @@ -869,7 +869,7 @@ static int cb_dump_route(struct nl_msg *msg, void *arg) if (s->callback) lua_call(s->L, 1, 0); else if (hdr->nlmsg_flags & NLM_F_MULTI) - lua_rawseti(s->L, 3, s->index); + lua_rawseti(s->L, -2, s->index); out: s->pending = !!(hdr->nlmsg_flags & NLM_F_MULTI); -- 2.11.0