summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-ip/src
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-22 15:25:41 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-22 15:25:41 +0100
commite9bfa5fe7942b1c8143c0a230c41a5b9ae90cabd (patch)
treeaa681911c46b3ab00bd8c11188e70d4653564be7 /libs/luci-lib-ip/src
parentb48386be67bc5530fe11499183fa9ef9f15f0829 (diff)
luci-lib-ip: fix routes() for non-callback invocations
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'libs/luci-lib-ip/src')
-rw-r--r--libs/luci-lib-ip/src/ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/luci-lib-ip/src/ip.c b/libs/luci-lib-ip/src/ip.c
index 66ecb567ef..403ffbd054 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);