diff options
Diffstat (limited to 'examples/nft-rule-del.c')
-rw-r--r-- | examples/nft-rule-del.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/nft-rule-del.c b/examples/nft-rule-del.c index 5ddfd50..c2b1a70 100644 --- a/examples/nft-rule-del.c +++ b/examples/nft-rule-del.c @@ -15,6 +15,7 @@ #include <stddef.h> /* for offsetof */ #include <netinet/in.h> +#include <linux/netfilter.h> #include <linux/netfilter/nf_tables.h> #include <libmnl/libmnl.h> @@ -42,13 +43,15 @@ int main(int argc, char *argv[]) } if (strcmp(argv[1], "ip") == 0) - family = AF_INET; + family = NFPROTO_IPV4; else if (strcmp(argv[1], "ip6") == 0) - family = AF_INET6; + family = NFPROTO_IPV6; else if (strcmp(argv[1], "bridge") == 0) - family = AF_BRIDGE; + family = NFPROTO_BRIDGE; + else if (strcmp(argv[1], "arp") == 0) + family = NFPROTO_ARP; else { - fprintf(stderr, "Unknown family: ip, ip6, bridge\n"); + fprintf(stderr, "Unknown family: ip, ip6, bridge, arp\n"); exit(EXIT_FAILURE); } |