diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-24 14:25:53 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-24 14:25:53 +0100 |
commit | eb1ef783f6a82c784f791880fd5e5ada5fa00bb5 (patch) | |
tree | 284bc2a4c604159c1cf2e2685a18fdf506c19c46 /libs | |
parent | 40066a6799ba04cbf23c7752de6e83103a33ccad (diff) |
luci-lib-ip: fix netlink receiving in link()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/luci-lib-ip/src/ip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/luci-lib-ip/src/ip.c b/libs/luci-lib-ip/src/ip.c index c799419e5..5bff693f6 100644 --- a/libs/luci-lib-ip/src/ip.c +++ b/libs/luci-lib-ip/src/ip.c @@ -1270,7 +1270,9 @@ static int link_get(lua_State *L) lua_newtable(L); nl_send_auto_complete(sock, msg); - nl_recvmsgs(sock, cb); + + while (st.pending > 0) + nl_recvmsgs(sock, cb); nlmsg_free(msg); nl_cb_put(cb); |