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
25#define EBT_IP_SPORT 0x1025#define EBT_IP_SPORT 0x10
26#define EBT_IP_DPORT 0x2026#define EBT_IP_DPORT 0x20
27#define EBT_IP_ICMP 0x4027#define EBT_IP_ICMP 0x40
28#define EBT_IP_IGMP 0x80
28#define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\29#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)
30#define EBT_IP_MATCH "ip"31#define EBT_IP_MATCH "ip"
31 32
32/* the same values are used for the invflags */33/* the same values are used for the invflags */
@@ -42,6 +43,7 @@ struct ebt_ip_info { · 9 unmodified lines
42 union {43 union {
43 __u16 sport[2];44 __u16 sport[2];
44 __u8 icmp_type[2];45 __u8 icmp_type[2];
46 __u8 igmp_type[2];
45 };47 };
46 union {48 union {
47 __u16 dport[2];49 __u16 dport[2];