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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -25,8 +25,9 @@ · 24 unmodified lines | |||
| 25 | #define EBT_IP_SPORT 0x10 | 25 | #define EBT_IP_SPORT 0x10 |
| 26 | #define EBT_IP_DPORT 0x20 | 26 | #define EBT_IP_DPORT 0x20 |
| 27 | #define EBT_IP_ICMP 0x40 | 27 | #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]; |