luci-lib-ip: fix routes() for non-callback invocations
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
b48386be67
commit
e9bfa5fe79
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue