]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: reset netlink sender buffer size of socket restart
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 20 May 2019 18:46:40 +0000 (20:46 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 20 May 2019 19:06:24 +0000 (21:06 +0200)
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>
iptables/nft.c

index 9a3e9fdf4f121c9d919a6d3172eb65e70bcacfcd..2c61521455de85275f00160d0a7fdcfd9a8923f9 100644 (file)
@@ -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;
 }