From 1b31fcf3da6b5650cb3254edded6233f5c7d6a27 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 2 Mar 2003 09:21:38 -0800 Subject: [PATCH] [NETFILTER]: Fix icmp-type all problem in iptables. --- net/ipv4/netfilter/ip_tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 7946307d2e5d6..3b46c237e28f0 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -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; } -- 2.53.0