From 0d9d04c31481c7c73b4ba64f0ad746b84c4250c5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 14 Aug 2017 17:47:21 +0200 Subject: src: make netlink sequence number non-static Place sequence number that is allocated per-command on the struct netlink_ctx structure. This is allocated from nft_run() to correlate commands with netlink messages for error reporting. Batch support probing also shares this sequence numbers with commands. There is an inpendent cache sequence number though, this routine is called from a different path, usually from the evaluation phase. Signed-off-by: Pablo Neira Ayuso --- include/netlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index 37261714..0e1d26b6 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -195,7 +195,7 @@ extern void netlink_dump_obj(struct nftnl_obj *nlo); extern int netlink_batch_send(struct netlink_ctx *ctx, struct list_head *err_list); -extern void netlink_genid_get(struct mnl_socket *nf_sock); +extern void netlink_genid_get(struct mnl_socket *nf_sock, uint32_t seqnum); extern void netlink_restart(struct mnl_socket *nf_sock); #define netlink_abi_error() \ __netlink_abi_error(__FILE__, __LINE__, strerror(errno)); @@ -224,7 +224,7 @@ struct netlink_mon_handler { extern int netlink_monitor(struct netlink_mon_handler *monhandler, struct mnl_socket *nf_sock); -bool netlink_batch_supported(struct mnl_socket *nf_sock); +bool netlink_batch_supported(struct mnl_socket *nf_sock, uint32_t *seqnum); int netlink_echo_callback(const struct nlmsghdr *nlh, void *data); -- cgit v1.2.3