]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: datatype: Modify symbol table for icmpv6 packet types
authorShivani Bhardwaj <shivanib134@gmail.com>
Tue, 5 Jan 2016 12:20:23 +0000 (17:50 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 31 Jan 2016 21:32:18 +0000 (22:32 +0100)
Add the missing symbols and correct the macros corresponding to the
existing symbols.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/datatype.c

index f56763b91087dbc0644cc03a6cc1a49c73a9ff33..40e14c934da3030fc460d665e193585544f2b9b7 100644 (file)
@@ -17,6 +17,7 @@
 #include <arpa/inet.h>
 #include <linux/types.h>
 #include <linux/netfilter.h>
+#include <linux/icmpv6.h>
 
 #include <nftables.h>
 #include <datatype.h>
@@ -26,7 +27,6 @@
 #include <netlink.h>
 
 #include <netinet/ip_icmp.h>
-#include <netinet/icmp6.h>
 
 static const struct datatype *datatypes[TYPE_MAX + 1] = {
        [TYPE_INVALID]          = &invalid_type,
@@ -731,10 +731,12 @@ const struct datatype icmp_code_type = {
 
 static const struct symbol_table icmpv6_code_tbl = {
        .symbols        = {
-               SYMBOL("no-route",              ICMP6_DST_UNREACH_NOROUTE),
-               SYMBOL("admin-prohibited",      ICMP6_DST_UNREACH_ADMIN),
-               SYMBOL("addr-unreachable",      ICMP6_DST_UNREACH_ADDR),
-               SYMBOL("port-unreachable",      ICMP6_DST_UNREACH_NOPORT),
+               SYMBOL("no-route",              ICMPV6_NOROUTE),
+               SYMBOL("admin-prohibited",      ICMPV6_ADM_PROHIBITED),
+               SYMBOL("addr-unreachable",      ICMPV6_ADDR_UNREACH),
+               SYMBOL("port-unreachable",      ICMPV6_PORT_UNREACH),
+               SYMBOL("policy-fail",           ICMPV6_POLICY_FAIL),
+               SYMBOL("reject-route",          ICMPV6_REJECT_ROUTE),
                SYMBOL_LIST_END
        },
 };