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
This commit is contained in:
Pouria Mousavizadeh Tehrani committed 2026-08-05 18:50:04 +03:30
1 parent 62ccaec3db
commit 200de1b70e
1 file changed
+4 -4
+4 -4
View File
@@ -1138,9 +1138,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 */
@@ -1149,9 +1149,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++;
}
/* Reachable Time */