summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-05-20 20:46:40 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-05-20 21:06:24 +0200
commit17c282003f463969f683f9ebaeb6f550c63ec3f5 (patch)
tree2c1642074b868393936eb0a5b2ec92dc1aa81806 /iptables
parent9014217972c0a81c17524a7d2fdec6381aa42c69 (diff)
nft: reset netlink sender buffer size of socket restart
Otherwise, mnl_set_sndbuffer() skips the buffer update after socket restart. Then, sendmsg() fails with EMSGSIZE later on when sending the batch to the kernel. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables')
-rw-r--r--iptables/nft.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 9a3e9fdf..2c615214 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -794,6 +794,7 @@ static int nft_restart(struct nft_handle *h)
return -1;
h->portid = mnl_socket_get_portid(h->nl);
+ nlbuffsiz = 0;
return 0;
}