Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Aug 2026 06:17:09 +0000
From:      Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c3a70b0319d9 - stable/15 - rtadvd(8): Fix RA flag inconsistency messages
Message-ID:  <6a76c9e5.39276.43799690@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by pouria:

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

commit c3a70b0319d9ace70c9229e306f114893df1d714
Author:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-08-05 08:27:54 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-08-08 06:13:59 +0000

    rtadvd(8): Fix RA flag inconsistency messages
    
    During flag inconsistency report, we handle rai->rai_otherflg
    as a bool, but the value is 0x40. Make it a simple number comparison.
    
    PR:             295995
    Reviewed by:    markj, Faraz Vahedi <kfv@kfv.io>
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D58672
    
    (cherry picked from commit 200de1b70e2b4f809d1d3a4c430db80b24124468)
---
 usr.sbin/rtadvd/rtadvd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index fa5640afa96c..fc157ea141b2 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -1130,9 +1130,9 @@ ra_input(int len, struct nd_router_advert *nra,
 		syslog(LOG_NOTICE,
 		    "M flag inconsistent on %s:"
 		    " %s from %s, %s from us",
-		    ifi->ifi_ifname, on_off[!rai->rai_managedflg],
+		    ifi->ifi_ifname, on_off[rai->rai_managedflg == 0],
 		    inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf,
-			sizeof(ntopbuf)), on_off[rai->rai_managedflg]);
+			sizeof(ntopbuf)), on_off[rai->rai_managedflg != 0]);
 		inconsistent++;
 	}
 	/* O flag */
@@ -1141,9 +1141,9 @@ ra_input(int len, struct nd_router_advert *nra,
 		syslog(LOG_NOTICE,
 		    "O flag inconsistent on %s:"
 		    " %s from %s, %s from us",
-		    ifi->ifi_ifname, on_off[!rai->rai_otherflg],
+		    ifi->ifi_ifname, on_off[rai->rai_otherflg == 0],
 		    inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf,
-			sizeof(ntopbuf)), on_off[rai->rai_otherflg]);
+			sizeof(ntopbuf)), on_off[rai->rai_otherflg != 0]);
 		inconsistent++;
 	}
 #ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a76c9e5.39276.43799690>