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
This commit is contained in:
Andrey V. Elsukov
2026-04-02 13:14:29 +03:00
parent 59e9a4c05a
commit d9d7b59486
+2 -2
View File
@@ -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;