summaryrefslogtreecommitdiffstats
path: root/examples/nft-table-del.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nft-table-del.c')
-rw-r--r--examples/nft-table-del.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/nft-table-del.c b/examples/nft-table-del.c
index aa1827d..44f0b1f 100644
--- a/examples/nft-table-del.c
+++ b/examples/nft-table-del.c
@@ -29,12 +29,14 @@ static struct nftnl_table *table_del_parse(int argc, char *argv[])
family = NFPROTO_IPV4;
else if (strcmp(argv[1], "ip6") == 0)
family = NFPROTO_IPV6;
+ else if (strcmp(argv[1], "inet") == 0)
+ family = NFPROTO_INET;
else if (strcmp(argv[1], "bridge") == 0)
family = NFPROTO_BRIDGE;
else if (strcmp(argv[1], "arp") == 0)
family = NFPROTO_ARP;
else {
- fprintf(stderr, "Unknown family: ip, ip6, bridge, arp\n");
+ fprintf(stderr, "Unknown family: ip, ip6, inet, bridge, arp\n");
return NULL;
}
@@ -77,9 +79,9 @@ int main(int argc, char *argv[])
table_seq = seq;
family = nftnl_table_get_u32(t, NFTNL_TABLE_FAMILY);
- nlh = nftnl_table_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
- NFT_MSG_DELTABLE, family,
- NLM_F_ACK, seq++);
+ nlh = nftnl_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ NFT_MSG_DELTABLE, family,
+ NLM_F_ACK, seq++);
nftnl_table_nlmsg_build_payload(nlh, t);
mnl_nlmsg_batch_next(batch);
nftnl_table_free(t);