git: c3a70b0319d9 - stable/15 - rtadvd(8): Fix RA flag inconsistency messages
Pouria Mousavizadeh Tehrani <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a76c9e5.39276.43799690__41505.1839941711$1786169856$gmane$org@gitrepo.freebsd.org> |
The branch stable/15 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=c3a70b0319d9ace70c9229e306f114893df1d714 commit c3a70b0319d9ace70c9229e306f114893df1d714 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: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 <[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 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