fix 'icmp-type all' problem in iptables
Subsystems (2)
PATCH 1/1 fix 'icmp-type all' problem in iptables
Hi Dave!
Here is the first of yet another set of iptables bugfixes for 2.4.x and 2.5.x:
Up to now the problem was:
'-p icmp ' matches all icmp packets '-p icmp -m icmp' matches _only_ ICMP type 0 :(
This is now fixed by initializing the field in userspace to the bogus icmp type 0xFF. Old kernels (prior to this patch) would then match packets with icmp-type 255 [which should never happen since it is undefined). New kernels with this patch have an explicit check for the 'magic value' 0xFF.
See also: https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=37
Credits go to Filip Sneppe (Cronos)" <[email protected]>
Please apply, thanks.
net/ipv4/netfilter/ip_tables.c Sun Feb 23 12:58:32 2003 renamed from net/ipv4/netfilter/ip_tables.c Fri Nov 29 00:53:15 2002 +1 -1
@@ -1630,7 +1630,7 @@ u_int8_t type, u_int8_t code, int invert) { - return (type == test_type && code >= min_code && code <= max_code) + return ((test_type == 0xFF) || (type == test_type && code >= min_code && code <= max_code)) ^ invert; }
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
Quoted 5 lines · Harald Welte
See also: https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=37
Credits go to Filip Sneppe (Cronos)" <[email protected]>
Hi,
For the record, I did not report this problem nor help in solving it. Credits should go to Balazs Scheidler <[email protected]> :-)
Regards,
Filip
David S. Miller
Applied From: Harald Welte <[email protected]>
Date: Wed, 26 Feb 2003 19:26:09 +0100
Here is the first of yet another set of iptables bugfixes for 2.4.x and 2.5.x:
Applied, thanks.