summaryrefslogtreecommitdiffstats
path: root/examples/nft-set-get.c
diff options
context:
space:
mode:
authorJose M. Guisado Gomez <guigom@riseup.net>2020-07-27 12:31:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2020-07-27 18:27:47 +0200
commit330ca1cddd63762aa3127af0c9748d87964e789f (patch)
tree186f9df4f1fbccc12307349e0178f7c4e955c220 /examples/nft-set-get.c
parent142538808a7163639344d4ab1362395cc5261746 (diff)
examples: add support for NF_PROTO_INET family
Add missing support for "inet" family for a handful of examples where applicable. Signed-off-by: Jose M. Guisado Gomez <guigom@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples/nft-set-get.c')
-rw-r--r--examples/nft-set-get.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/nft-set-get.c b/examples/nft-set-get.c
index bb33674..cbe3f85 100644
--- a/examples/nft-set-get.c
+++ b/examples/nft-set-get.c
@@ -70,6 +70,8 @@ int main(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)
@@ -77,7 +79,7 @@ int main(int argc, char *argv[])
else if (strcmp(argv[1], "unspec") == 0)
family = NFPROTO_UNSPEC;
else {
- fprintf(stderr, "Unknown family: ip, ip6, bridge, arp, unspec\n");
+ fprintf(stderr, "Unknown family: ip, ip6, inet, bridge, arp, unspec\n");
exit(EXIT_FAILURE);
}