]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: replace nftnl_.*_nlmsg_build_hdr() by nftnl_nlmsg_build_hdr()
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Nov 2022 16:54:42 +0000 (17:54 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 15 Nov 2022 16:04:03 +0000 (17:04 +0100)
Replace alias to real nftnl_nlmsg_build_hdr() function call.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-cache.c
iptables/nft.c
iptables/xtables-monitor.c

index 2403508c684aa2ea27d0ef7a460e9d918edac06c..76e99adcb8566f8948a6fea52256260214147668 100644 (file)
@@ -142,8 +142,8 @@ static int fetch_table_cache(struct nft_handle *h)
        char buf[16536];
        int i, ret;
 
-       nlh = nftnl_rule_nlmsg_build_hdr(buf, NFT_MSG_GETTABLE, h->family,
-                                       NLM_F_DUMP, h->seq);
+       nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETTABLE, h->family,
+                                   NLM_F_DUMP, h->seq);
 
        ret = mnl_talk(h, nlh, nftnl_table_list_cb, h);
        if (ret < 0 && errno == EINTR)
@@ -454,8 +454,8 @@ static int fetch_set_cache(struct nft_handle *h,
                }
        }
 
-       nlh = nftnl_set_nlmsg_build_hdr(buf, NFT_MSG_GETSET,
-                                       h->family, flags, h->seq);
+       nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETSET,
+                                   h->family, flags, h->seq);
 
        if (s) {
                nftnl_set_nlmsg_build_payload(nlh, s);
@@ -497,8 +497,8 @@ static int __fetch_chain_cache(struct nft_handle *h,
        struct nlmsghdr *nlh;
        int ret;
 
-       nlh = nftnl_chain_nlmsg_build_hdr(buf, NFT_MSG_GETCHAIN, h->family,
-                                         c ? NLM_F_ACK : NLM_F_DUMP, h->seq);
+       nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETCHAIN, h->family,
+                                   c ? NLM_F_ACK : NLM_F_DUMP, h->seq);
        if (c)
                nftnl_chain_nlmsg_build_payload(nlh, c);
 
@@ -592,8 +592,8 @@ static int nft_rule_list_update(struct nft_chain *nc, void *data)
        nftnl_rule_set_str(rule, NFTNL_RULE_CHAIN,
                           nftnl_chain_get_str(c, NFTNL_CHAIN_NAME));
 
-       nlh = nftnl_rule_nlmsg_build_hdr(buf, NFT_MSG_GETRULE, h->family,
-                                       NLM_F_DUMP, h->seq);
+       nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETRULE, h->family,
+                                   NLM_F_DUMP, h->seq);
        nftnl_rule_nlmsg_build_payload(nlh, rule);
 
        ret = mnl_talk(h, nlh, nftnl_rule_list_cb, &rld);
index b65da371252091dcc6a6b10d5f0956c9430ae75e..4c0110bb80401568d1cb29aa121f102d083442a2 100644 (file)
@@ -2891,8 +2891,8 @@ static void nft_compat_table_batch_add(struct nft_handle *h, uint16_t type,
 {
        struct nlmsghdr *nlh;
 
-       nlh = nftnl_table_nlmsg_build_hdr(nftnl_batch_buffer(h->batch),
-                                       type, h->family, flags, seq);
+       nlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(h->batch),
+                                   type, h->family, flags, seq);
        nftnl_table_nlmsg_build_payload(nlh, table);
        nft_table_print_debug(h, table, nlh);
 }
@@ -2936,8 +2936,8 @@ static void nft_compat_chain_batch_add(struct nft_handle *h, uint16_t type,
 {
        struct nlmsghdr *nlh;
 
-       nlh = nftnl_chain_nlmsg_build_hdr(nftnl_batch_buffer(h->batch),
-                                       type, h->family, flags, seq);
+       nlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(h->batch),
+                                   type, h->family, flags, seq);
        nftnl_chain_nlmsg_build_payload(nlh, chain);
        nft_chain_print_debug(h, chain, nlh);
 }
@@ -2948,8 +2948,8 @@ static void nft_compat_rule_batch_add(struct nft_handle *h, uint16_t type,
 {
        struct nlmsghdr *nlh;
 
-       nlh = nftnl_rule_nlmsg_build_hdr(nftnl_batch_buffer(h->batch),
-                                      type, h->family, flags, seq);
+       nlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(h->batch),
+                                   type, h->family, flags, seq);
        nftnl_rule_nlmsg_build_payload(nlh, rule);
        nft_rule_print_debug(h, rule, nlh);
 }
index a1eba2f43407bdad63a0fe2e7f1a4b9af7fa8bea..cf2729d87968b2a62ec593c5b1ee90556dce98f1 100644 (file)
@@ -227,7 +227,7 @@ static void trace_print_rule(const struct nftnl_trace *nlt, struct cb_arg *args)
                exit(EXIT_FAILURE);
        }
 
-       nlh = nftnl_chain_nlmsg_build_hdr(buf, NFT_MSG_GETRULE, family, 0, 0);
+       nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETRULE, family, 0, 0);
 
         nftnl_rule_set_u32(r, NFTNL_RULE_FAMILY, family);
        nftnl_rule_set_str(r, NFTNL_RULE_CHAIN, chain);