Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Apr 2026 08:37:27 +0000
From:      Andrey V. Elsukov <ae@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4b6de64b99b9 - stable/14 - ipfw_nptv6: fix handling the ifaddr removal event
Message-ID:  <69d76547.41854.73d053eb@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by ae:

URL: https://cgit.FreeBSD.org/src/commit/?id=4b6de64b99b984bee2f9f16f00364ba7f52a5dc1

commit 4b6de64b99b984bee2f9f16f00364ba7f52a5dc1
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2026-04-02 10:14:29 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2026-04-09 08:36:13 +0000

    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>
    
    (cherry picked from commit d9d7b59486499615a5fdce54443ce62aecf557e8)
---
 sys/netpfil/ipfw/nptv6/nptv6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netpfil/ipfw/nptv6/nptv6.c b/sys/netpfil/ipfw/nptv6/nptv6.c
index 640bdedbf037..3aa2df306480 100644
--- a/sys/netpfil/ipfw/nptv6/nptv6.c
+++ b/sys/netpfil/ipfw/nptv6/nptv6.c
@@ -594,8 +594,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;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d76547.41854.73d053eb>