From 2cf79802834cf143dffb3d6a8044e1e11419e8ec Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 2 Mar 2021 12:35:20 +0100 Subject: mnl: remove nft_mnl_socket_reopen() nft_mnl_socket_reopen() was introduced to deal with the EINTR case. By reopening the netlink socket, pending netlink messages that are part of a stale netlink dump are implicitly drop. This patch replaces the nft_mnl_socket_reopen() strategy by pulling out all of the remaining netlink message to restart in a clean state. This is implicitly fixing up a bug in the table ownership support, which assumes that the netlink socket remains open until nft_ctx_free() is invoked. Signed-off-by: Pablo Neira Ayuso --- include/mnl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/mnl.h') diff --git a/include/mnl.h b/include/mnl.h index 74b1b56f..979929c3 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -7,7 +7,6 @@ #include struct mnl_socket *nft_mnl_socket_open(void); -struct mnl_socket *nft_mnl_socket_reopen(struct mnl_socket *nf_sock); uint32_t mnl_seqnum_alloc(uint32_t *seqnum); uint32_t mnl_genid_get(struct netlink_ctx *ctx); -- cgit v1.2.3