From ec30e705cf3346827584413cb49e41d1f28ff0b9 Mon Sep 17 00:00:00 2001 From: Alexandr Nedvedicky Date: Tue, 7 Feb 2023 17:58:44 +0000 Subject: internal representation of icmp type/code in pfctl(8)/pf(4) does not fit into u_int8_t. Issue has been noticed and kindly reported by amalinin _at_ bh0.amt.ru via bugs@. OK bluhm@ --- sys/net/pfvar.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/net/pfvar.h') diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 1453bc35c04..3a7ff6b295c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.528 2023/01/06 17:44:34 sashan Exp $ */ +/* $OpenBSD: pfvar.h,v 1.529 2023/02/07 17:58:43 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -572,8 +572,8 @@ struct pf_rule { u_int8_t keep_state; sa_family_t af; u_int8_t proto; - u_int8_t type; - u_int8_t code; + u_int16_t type; /* aux. value 256 is legit */ + u_int16_t code; /* aux. value 256 is legit */ u_int8_t flags; u_int8_t flagset; u_int8_t min_ttl; @@ -592,7 +592,6 @@ struct pf_rule { u_int8_t set_prio[2]; sa_family_t naf; u_int8_t rcvifnot; - u_int8_t pad[2]; struct { struct pf_addr addr; -- cgit v1.2.3