The branch main has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3320ca120591d05f1e2ac0dc4d5235f54b2694f4

commit 3320ca120591d05f1e2ac0dc4d5235f54b2694f4
Author:     John Baldwin <[email protected]>
AuthorDate: 2022-04-13 23:08:21 +0000
Commit:     John Baldwin <[email protected]>
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:

Reply via email to