Date: Fri, 02 Jun 2023 19:57:40 +0100 From: "Alexander Chernikov" <melifaro@FreeBSD.org> To: freebsd-current@freebsd.org Subject: Re: Error building kernel in current Message-ID: <e9bc5d62-a47f-4787-b9a7-267967ce1297@app.fastmail.com> In-Reply-To: <20230602173055.583db61d@ernst.home> References: <20230602115644.7ce88b9f@ernst.home> <20230602115940.7c9d2f4e@ernst.home> <20230602173055.583db61d@ernst.home>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, 2 Jun 2023, at 4:30 PM, Gary Jennejohn wrote: > On Fri, 2 Jun 2023 09:59:40 +0000 > Gary Jennejohn <garyj@gmx.de> wrote: > > > On Fri, 2 Jun 2023 09:56:44 +0000 > > Gary Jennejohn <garyj@gmx.de> wrote: > > > > > Error building kernel in current: > > > > > > -------------------------------------------------------------- > > > >>> stage 3.1: building everything > > > -------------------------------------------------------------- > > > /usr/src/sys/netlink/route/iface.c:1315:22: error: use of undeclared > > > identifier 'if_flags' > > > if (error == 0 && !(if_flags & IFF_UP) && (if_getflags(ifp) & IFF_UP)) > > > ^ > > > 1 error generated. > > > --- iface.o --- > > > *** [iface.o] Error code 1 Sorry for the breakage, I’ll fix it in a couple of hours. > > > > > > My source tree was updated just a few minutes ago and I didn't see any > > > recent changes to iface.c. > > > > > > I have WITHOUT_NETLINK_SUPPORT= in my src.conf. > > > > > > > Ah, my error. The failure occurs while building the kernel, so I fixed > > Subject accordingly. > > > > OK, this is another INET6 error. I don't have INET6 enabled. > > At line 1280 we have: > #ifdef INET6 > int if_flags = if_getflags(ifp); > #endif > > and if_flags is used at line 1315 without checking whether INET6 is > defined. > > if_flags seems to be totally redundant, since the code at line 1315 will > invoke if_getflags(ifp) if !(if_flags & IFF_UP) is true. I wish it was true. The case here is that interface flags can change after adding the address, as many interface drivers silently bring the interface up upon the first address addition. Please see https://cgit.freebsd.org/src/commit/sys/netinet6?id=a77facd27368f618520d25391cfce11149879a41 description for a more detailed explanation. > > -- > Gary Jennejohn > > /Alexander [-- Attachment #2 --] <!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Fri, 2 Jun 2023, at 4:30 PM, Gary Jennejohn wrote:<br></div><blockquote type="cite" id="qt" style=""><div>On Fri, 2 Jun 2023 09:59:40 +0000<br></div><div>Gary Jennejohn <<a href="mailto:garyj@gmx.de">garyj@gmx.de</a>> wrote:<br></div><div><br></div><div>> On Fri, 2 Jun 2023 09:56:44 +0000<br></div><div>> Gary Jennejohn <<a href="mailto:garyj@gmx.de">garyj@gmx.de</a>> wrote:<br></div><div>><br></div><div>> > Error building kernel in current:<br></div><div>> ><br></div><div>> > --------------------------------------------------------------<br></div><div>> > >>> stage 3.1: building everything<br></div><div>> > --------------------------------------------------------------<br></div><div>> > /usr/src/sys/netlink/route/iface.c:1315:22: error: use of undeclared<br></div><div>> > identifier 'if_flags'<br></div><div>> > if (error == 0 && !(if_flags & IFF_UP) && (if_getflags(ifp) & IFF_UP))<br></div><div>> > ^<br></div><div>> > 1 error generated.<br></div><div>> > --- iface.o ---<br></div><div>> > *** [iface.o] Error code 1<br></div></blockquote><div>Sorry for the breakage, I’ll fix it in a couple of hours.</div><blockquote type="cite" id="qt" style=""><div>> ><br></div><div>> > My source tree was updated just a few minutes ago and I didn't see any<br></div><div>> > recent changes to iface.c.<br></div><div>> ><br></div><div>> > I have WITHOUT_NETLINK_SUPPORT= in my src.conf.<br></div><div>> ><br></div><div>><br></div><div>> Ah, my error. The failure occurs while building the kernel, so I fixed<br></div><div>> Subject accordingly.<br></div><div>><br></div><div><br></div><div>OK, this is another INET6 error. I don't have INET6 enabled.<br></div><div><br></div><div>At line 1280 we have:<br></div><div>#ifdef INET6<br></div><div>int if_flags = if_getflags(ifp);<br></div><div>#endif<br></div><div><br></div><div>and if_flags is used at line 1315 without checking whether INET6 is<br></div><div>defined.<br></div><div><br></div><div>if_flags seems to be totally redundant, since the code at line 1315 will<br></div><div>invoke if_getflags(ifp) if !(if_flags & IFF_UP) is true.<br></div></blockquote><div>I wish it was true. The case here is that interface flags can change after adding the address, as many interface drivers silently bring the interface up upon the first address addition. Please see <a href="https://cgit.freebsd.org/src/commit/sys/netinet6?id=a77facd27368f618520d25391cfce11149879a41">https://cgit.freebsd.org/src/commit/sys/netinet6?id=a77facd27368f618520d25391cfce11149879a41</a> description for a more detailed explanation.</div><blockquote type="cite" id="qt" style=""><div><br></div><div>--<br></div><div>Gary Jennejohn<br></div><div><br></div><div><br></div></blockquote><div><br></div><div id="sig132921232"><div class="signature">/Alexander<br></div></div><div><br></div></body></html>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e9bc5d62-a47f-4787-b9a7-267967ce1297>
