diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-22 21:20:44 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-22 21:45:37 +0200 |
commit | d7ef1e206bd9b36607dddcf337fada11d743b61f (patch) | |
tree | 11885479b860f6e9ec278ace76e4c1c7f01ee47e /src/rule.c | |
parent | 2dc07bcd7eaa56369dff01b596acf010308007d3 (diff) |
netlink: reset mnl_socket field in struct nft_ctx on EINTR
Otherwise we keep using the old netlink socket if we hit EINTR.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r-- | src/rule.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |