History

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.

Florian Westphal committed 15 years ago

Commit 6faee601 parent 255d0dc2 files · +46 −15Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/linux/netfilter_bridge/ebt_ip6.h+12−3
@@ -18,8 +18,11 @@ · 17 unmodified lines
1818 #define EBT_IP6_PROTO 0x08
1919 #define EBT_IP6_SPORT 0x10
2020 #define EBT_IP6_DPORT 0x20
21+#define EBT_IP6_ICMP6 0x40
22+
2123 #define EBT_IP6_MASK (EBT_IP6_SOURCE | EBT_IP6_DEST | EBT_IP6_TCLASS |\
22− EBT_IP6_PROTO | EBT_IP6_SPORT | EBT_IP6_DPORT)
24+ EBT_IP6_PROTO | EBT_IP6_SPORT | EBT_IP6_DPORT | \
25+ EBT_IP6_ICMP6)
2326 #define EBT_IP6_MATCH "ip6"
2427
2528 /* the same values are used for the invflags */
@@ -32,8 +35,14 @@ struct ebt_ip6_info { · 6 unmodified lines
3235 uint8_t protocol;
3336 uint8_t bitmask;
3437 uint8_t invflags;
35− uint16_t sport[2];
36− uint16_t dport[2];
38+ union {
39+ uint16_t sport[2];
40+ uint8_t icmpv6_type[2];
41+ };
42+ union {
43+ uint16_t dport[2];
44+ uint8_t icmpv6_code[2];
45+ };
3746 };
3847
3948 #endif