From ad1a6a876841bdd46c86a4061d33ed37c24a88fe Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 6 Jan 2018 13:03:41 +0800 Subject: [PATCH] ipfw: ICMP_MAXTYPE could be any value; don't assume it's < 32 It is 40 as of this commit. --- sys/net/ipfw/ip_fw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/ipfw/ip_fw2.c b/sys/net/ipfw/ip_fw2.c index 470d5f621e..f1d284b68a 100644 --- a/sys/net/ipfw/ip_fw2.c +++ b/sys/net/ipfw/ip_fw2.c @@ -1205,7 +1205,7 @@ is_icmp_query(struct ip *ip) { int type = L3HDR(struct icmp, ip)->icmp_type; - return (type <= ICMP_MAXTYPE && (TT & (1 << type))); + return (type < 32 && (TT & (1 << type))); } #undef TT -- 2.41.0