From: Pablo Neira Ayuso Date: Mon, 20 May 2019 18:46:40 +0000 (+0200) Subject: nft: reset netlink sender buffer size of socket restart X-Git-Tag: v1.8.3~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17c282003f463969f683f9ebaeb6f550c63ec3f5;p=thirdparty%2Fiptables.git 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 --- 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; }