diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/netlink.c | 4 | ||||
-rw-r--r-- | src/rule.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/netlink.c b/src/netlink.c index 755949c9..403780ff 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -73,10 +73,10 @@ void netlink_close_sock(struct mnl_socket *nf_sock) mnl_socket_close(nf_sock); } -void netlink_restart(struct mnl_socket *nf_sock) +struct mnl_socket *netlink_restart(struct mnl_socket *nf_sock) { netlink_close_sock(nf_sock); - nf_sock = netlink_open_sock(); + return netlink_open_sock(); } void __noreturn __netlink_abi_error(const char *file, int line, @@ -229,7 +229,6 @@ int cache_update(struct nft_ctx *nft, enum cmd_ops cmd, struct list_head *msgs) .msgs = msgs, .nft = nft, }; - struct mnl_socket *nf_sock = nft->nf_sock; struct nft_cache *cache = &nft->cache; replay: @@ -244,7 +243,7 @@ replay: if (ret < 0) { cache_release(cache); if (errno == EINTR) { - netlink_restart(nf_sock); + nft->nf_sock = netlink_restart(nft->nf_sock); goto replay; } return -1; |