From d7ef1e206bd9b36607dddcf337fada11d743b61f Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 22 Oct 2018 21:20:44 +0200 Subject: netlink: reset mnl_socket field in struct nft_ctx on EINTR Otherwise we keep using the old netlink socket if we hit EINTR. Signed-off-by: Pablo Neira Ayuso --- include/netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index b26ef459..66e400d8 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -157,7 +157,7 @@ extern void netlink_dump_obj(struct nftnl_obj *nlo, struct netlink_ctx *ctx); extern int netlink_batch_send(struct netlink_ctx *ctx, struct list_head *err_list); -extern void netlink_restart(struct mnl_socket *nf_sock); +extern struct mnl_socket *netlink_restart(struct mnl_socket *nf_sock); #define netlink_abi_error() \ __netlink_abi_error(__FILE__, __LINE__, strerror(errno)); extern void __noreturn __netlink_abi_error(const char *file, int line, const char *reason); -- cgit v1.2.3