Date: Thu, 11 Jun 2026 11:06:24 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 295995] rtadvd segfault with -d Message-ID: <bug-295995-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295995 Bug ID: 295995 Summary: rtadvd segfault with -d Product: Base System Version: 15.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: freebsd-bugzilla@botchitt.com rtadvd segfaults when run with the -d flag in my environment. It seems to be caused by sections like the following in rtadvd.c: /* O flag */ if ((nra->nd_ra_flags_reserved & ND_RA_FLAG_OTHER) != rai->rai_otherflg) { syslog(LOG_NOTICE, "O flag inconsistent on %s:" " %s from %s, %s from us", ifi->ifi_ifname, on_off[!rai->rai_otherflg], inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf, sizeof(ntopbuf)), on_off[rai->rai_otherflg]); inconsistent++; } where rai->rai_otherflg in this case is 0x40 but handled as a bool. Here's a diff that fixes it for my case as well as other similarly-handled flags: --- config.c.orig 2025-12-04 16:54:44.000000000 +0000 +++ config.c 2026-06-11 11:59:51.691932000 +0100 @@ -443,8 +443,8 @@ } else MAYHAVE(val, "raflags", 0); - rai->rai_managedflg = val & ND_RA_FLAG_MANAGED; - rai->rai_otherflg = val & ND_RA_FLAG_OTHER; + rai->rai_managedflg = !!(val & ND_RA_FLAG_MANAGED); + rai->rai_otherflg = !!(val & ND_RA_FLAG_OTHER); #ifndef ND_RA_FLAG_RTPREF_MASK #define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */ #define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ @@ -456,7 +456,7 @@ goto getconfig_free_rai; } #ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - rai->rai_ipv6onlyflg = val & ND_RA_FLAG_IPV6_ONLY; + rai->rai_ipv6onlyflg = !!(val & ND_RA_FLAG_IPV6_ONLY); #endif MAYHAVE(val, "rltime", rai->rai_maxinterval * 3); -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-295995-227>
