git: 3320ca120591 - main - ipfw: icmp6_type is only used for INET6.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Apr 2022 23:09:38 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=3320ca120591d05f1e2ac0dc4d5235f54b2694f4
commit 3320ca120591d05f1e2ac0dc4d5235f54b2694f4
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-13 23:08:21 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-13 23:08:21 +0000
ipfw: icmp6_type is only used for INET6.
---
sys/netpfil/ipfw/ip_fw2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index 7775b519270f..aaca2e2b2fcd 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -1438,7 +1438,9 @@ ipfw_chk(struct ip_fw_args *args)
/* XXX ipv6 variables */
int is_ipv6 = 0;
+#ifdef INET6
uint8_t icmp6_type = 0;
+#endif
uint16_t ext_hd = 0; /* bits vector for extension header filtering */
/* end of ipv6 variables */
@@ -1550,7 +1552,9 @@ do { \
switch (proto) {
case IPPROTO_ICMPV6:
PULLUP_TO(hlen, ulp, struct icmp6_hdr);
+#ifdef INET6
icmp6_type = ICMP6(ulp)->icmp6_type;
+#endif
break;
case IPPROTO_TCP: