From 17c282003f463969f683f9ebaeb6f550c63ec3f5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 20 May 2019 20:46:40 +0200 Subject: 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 --- iptables/nft.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3