aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2026-04-02 10:14:29 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2026-04-02 10:14:29 +0000
commitd9d7b59486499615a5fdce54443ce62aecf557e8 (patch)
tree2ccdbd7fa19c91e5e8307230c2c468ccf0f2bd73
parent59e9a4c05a81a25aaf355cb18c24835abad96ff2 (diff)
ipfw_nptv6: fix handling the ifaddr removal event
The result of IN6_ARE_MASKED_ADDR_EQUAL() macro is not an integer, so threat it as a boolean value. PR: 294114 Reported by: Peter Much <pmc citylink dinoex sub org> MFC after: 1 week
-rw-r--r--sys/netpfil/ipfw/nptv6/nptv6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netpfil/ipfw/nptv6/nptv6.c b/sys/netpfil/ipfw/nptv6/nptv6.c
index bfe28d75a01d..c36e9597fe22 100644
--- a/sys/netpfil/ipfw/nptv6/nptv6.c
+++ b/sys/netpfil/ipfw/nptv6/nptv6.c
@@ -593,8 +593,8 @@ ifaddr_cb(struct namedobj_instance *ni, struct named_object *no,
if ((cfg->flags & NPTV6_READY) == 0)
return (0);
/* If address does not match the external prefix, ignore */
- if (IN6_ARE_MASKED_ADDR_EQUAL(&cfg->external, args->addr,
- &cfg->mask) != 0)
+ if (!IN6_ARE_MASKED_ADDR_EQUAL(&cfg->external, args->addr,
+ &cfg->mask))
return (0);
/* Otherwise clear READY flag */
cfg->flags &= ~NPTV6_READY;