[PATCH nft 2/4] src: get rid of netlink_genid_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 include/netlink.h | 1 -
 src/netlink.c     | 5 -----
 src/rule.c        | 5 +++--
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/netlink.h b/include/netlink.h
index d153e2be03ac..4925af04a707 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -195,7 +195,6 @@ 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 uint16_t netlink_genid_get(struct netlink_ctx *ctx);
 extern void netlink_restart(struct mnl_socket *nf_sock);
 #define netlink_abi_error()	\
 	__netlink_abi_error(__FILE__, __LINE__, strerror(errno));
diff --git a/src/netlink.c b/src/netlink.c
index 7639847b56c9..f40678f8c01b 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -79,11 +79,6 @@ void netlink_restart(struct mnl_socket *nf_sock)
 	nf_sock = netlink_open_sock();
 }
 
-uint16_t netlink_genid_get(struct netlink_ctx *ctx)
-{
-	return mnl_genid_get(ctx);
-}
-
 void __noreturn __netlink_abi_error(const char *file, int line,
 				    const char *reason)
 {
diff --git a/src/rule.c b/src/rule.c
index 6d027c261f97..32b13b19b6e1 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -235,7 +235,7 @@ int cache_update(struct mnl_socket *nf_sock, struct nft_cache *cache,
 
 replay:
 	ctx.seqnum = cache->seqnum++;
-	genid = netlink_genid_get(&ctx);
+	genid = mnl_genid_get(&ctx);
 	if (genid && genid == cache->genid)
 		return 0;
 	if (cache->genid)
@@ -278,7 +278,7 @@ void cache_flush(struct mnl_socket *nf_sock, struct nft_cache *cache,
 	};
 
 	__cache_flush(&cache->list);
-	cache->genid = netlink_genid_get(&ctx);
+	cache->genid = mnl_genid_get(&ctx);
 }
 
 void cache_release(struct nft_cache *cache)
@@ -1341,6 +1341,7 @@ void cmd_free(struct cmd *cmd)
 }
 
 #include <netlink.h>
+#include <mnl.h>
 
 static int __do_add_setelems(struct netlink_ctx *ctx, const struct handle *h,
 			     struct set *set, struct expr *expr, uint32_t flags)
-- 
2.11.0




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux