aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter_bridge/ebt_ip6.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2010-12-20 15:57:47 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2011-01-13 12:05:12 +0100
commit6faee60a4e82075853a437831768cc9e2e563e4e (patch)
tree2e5ae700342b8b24f027b7c7afa198f4bfe2e92f /include/linux/netfilter_bridge/ebt_ip6.h
parentnetfilter: x_table: speedup compat operations (diff)
downloadlinux-dev-6faee60a4e82075853a437831768cc9e2e563e4e.tar.xz
linux-dev-6faee60a4e82075853a437831768cc9e2e563e4e.zip
netfilter: ebt_ip6: allow matching on ipv6-icmp types/codes
To avoid adding a new match revision icmp type/code are stored in the sport/dport area. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Holger Eitzenberger <holger@eitzenberger.org> Reviewed-by: Bart De Schuymer<bdschuym@pandora.be> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to '')
-rw-r--r--include/linux/netfilter_bridge/ebt_ip6.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/netfilter_bridge/ebt_ip6.h b/include/linux/netfilter_bridge/ebt_ip6.h
index e5de98701519..22af18a3c16b 100644
--- a/include/linux/netfilter_bridge/ebt_ip6.h
+++ b/include/linux/netfilter_bridge/ebt_ip6.h
@@ -18,8 +18,11 @@
#define EBT_IP6_PROTO 0x08
#define EBT_IP6_SPORT 0x10
#define EBT_IP6_DPORT 0x20
+#define EBT_IP6_ICMP6 0x40
+
#define EBT_IP6_MASK (EBT_IP6_SOURCE | EBT_IP6_DEST | EBT_IP6_TCLASS |\
- EBT_IP6_PROTO | EBT_IP6_SPORT | EBT_IP6_DPORT)
+ EBT_IP6_PROTO | EBT_IP6_SPORT | EBT_IP6_DPORT | \
+ EBT_IP6_ICMP6)
#define EBT_IP6_MATCH "ip6"
/* the same values are used for the invflags */
@@ -32,8 +35,14 @@ struct ebt_ip6_info {
uint8_t protocol;
uint8_t bitmask;
uint8_t invflags;
- uint16_t sport[2];
- uint16_t dport[2];
+ union {
+ uint16_t sport[2];
+ uint8_t icmpv6_type[2];
+ };
+ union {
+ uint16_t dport[2];
+ uint8_t icmpv6_code[2];
+ };
};
#endif