git: b3e20e1a0386 - stable/14 - rtadvd(8): Fix RA flag inconsistency messages
Pouria Mousavizadeh Tehrani <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a76cac3.39cf4.a2d1e61__39406.7352450051$1786170073$gmane$org@gitrepo.freebsd.org> |
The branch stable/14 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=b3e20e1a0386815878f91872f5fe133bea4e08b0 commit b3e20e1a0386815878f91872f5fe133bea4e08b0 Author: Pouria Mousavizadeh Tehrani <[email protected]> AuthorDate: 2026-08-05 08:27:54 +0000 Commit: Pouria Mousavizadeh Tehrani <[email protected]> CommitDate: 2026-08-08 06:19:29 +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 <[email protected]> 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 181b1211d7af..ae37dbb065bb 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1135,9 +1135,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 */ @@ -1146,9 +1146,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