History

netfilter: ebtables: add support for matching IGMP type

We already have ICMPv6 type/code matches (which can be used to distinguish different types of MLD packets). Add support for IPv4 IGMP matches in the same way.

Matthias Schiffer committed 8 years ago

Commit 78d9f4d1 parent 5adc1662 files · +20 −3Browse files

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

Unified · Split

include/uapi/linux/netfilter_bridge/ebt_ip.h+3−1
@@ -25,8 +25,9 @@ · 24 unmodified lines
2525 #define EBT_IP_SPORT 0x10
2626 #define EBT_IP_DPORT 0x20
2727 #define EBT_IP_ICMP 0x40
28+#define EBT_IP_IGMP 0x80
2829 #define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\
29− EBT_IP_SPORT | EBT_IP_DPORT | EBT_IP_ICMP)
30+ EBT_IP_SPORT | EBT_IP_DPORT | EBT_IP_ICMP | EBT_IP_IGMP)
3031 #define EBT_IP_MATCH "ip"
3132
3233 /* the same values are used for the invflags */
@@ -42,6 +43,7 @@ struct ebt_ip_info { · 9 unmodified lines
4243 union {
4344 __u16 sport[2];
4445 __u8 icmp_type[2];
46+ __u8 igmp_type[2];
4547 };
4648 union {
4749 __u16 dport[2];