]> git.hungrycats.org Git - linux/commitdiff
[NETFILTER]: Fix icmp-type all problem in iptables.
authorHarald Welte <harald@gnumonks.org>
Sun, 2 Mar 2003 17:21:38 +0000 (09:21 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 2 Mar 2003 17:21:38 +0000 (09:21 -0800)
net/ipv4/netfilter/ip_tables.c

index 7946307d2e5d6b54b84ef6d154c5f42d85703c56..3b46c237e28f0edccfb2b7e37274e99cdc178eb0 100644 (file)
@@ -1611,7 +1611,7 @@ icmp_type_code_match(u_int8_t test_type, u_int8_t min_code, u_int8_t max_code,
                     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;
 }