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>
next in thread | previous in thread | raw e-mail | index | archive | help
--198b55cd52044226aa60ed116c0f2a28 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: >=20 > > 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 undeclar= ed > > > identifier 'if_flags' > > > if (error =3D=3D 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=E2=80=99ll 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=3D in my src.conf. > > > > > > > Ah, my error. The failure occurs while building the kernel, so I fi= xed > > Subject accordingly. > > >=20 > OK, this is another INET6 error. I don't have INET6 enabled. >=20 > At line 1280 we have: > #ifdef INET6 > int if_flags =3D if_getflags(ifp); > #endif >=20 > and if_flags is used at line 1315 without checking whether INET6 is > defined. >=20 > if_flags seems to be totally redundant, since the code at line 1315 wi= ll > 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 aft= er adding the address, as many interface drivers silently bring the inte= rface up upon the first address addition. Please see https://cgit.freebs= d.org/src/commit/sys/netinet6?id=3Da77facd27368f618520d25391cfce11149879= a41 description for a more detailed explanation. >=20 > -- > Gary Jennejohn >=20 >=20 /Alexander --198b55cd52044226aa60ed116c0f2a28 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso= Normal,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><blockquo= te type=3D"cite" id=3D"qt" style=3D""><div>On Fri, 2 Jun 2023 09:59:40 += 0000<br></div><div>Gary Jennejohn <<a href=3D"mailto:garyj@gmx.de">ga= ryj@gmx.de</a>> wrote:<br></div><div><br></div><div>> On Fri, 2 Ju= n 2023 09:56:44 +0000<br></div><div>> Gary Jennejohn <<a href=3D"m= ailto: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: buil= ding everything<br></div><div>> > --------------------------------= ------------------------------<br></div><div>> > /usr/src/sys/netl= ink/route/iface.c:1315:22: error: use of undeclared<br></div><div>> &= gt; identifier 'if_flags'<br></div><div>> >  = ; if (error =3D=3D 0 && !(if_flags &= IFF_UP) && (if_getflags(ifp) & IFF_UP))<br></div><div>> = > &n= bsp; &n= bsp; ^<br></div><div>> > 1 error generated= .<br></div><div>> > --- iface.o ---<br></div><div>> > *** [i= face.o] Error code 1<br></div></blockquote><div>Sorry for the breakage, = I=E2=80=99ll fix it in a couple of hours.</div><blockquote type=3D"cite"= id=3D"qt" style=3D""><div>> ><br></div><div>> > My source t= ree was updated just a few minutes ago and I didn't see any<br></div><di= v>> > recent changes to iface.c.<br></div><div>> ><br></div>= <div>> > I have WITHOUT_NETLINK_SUPPORT=3D in my src.conf.<br></di= v><div>> ><br></div><div>><br></div><div>> Ah, my error.&nbs= p; The failure occurs while building the kernel, so I fixed<br></div><di= v>> Subject accordingly.<br></div><div>><br></div><div><br></div><= div>OK, this is another INET6 error. I don't have INET6 enabled.<b= r></div><div><br></div><div>At line 1280 we have:<br></div><div>#ifdef I= NET6<br></div><div>int if_flags =3D if_getflags(ifp);<br></div><div>#end= if<br></div><div><br></div><div>and if_flags is used at line 1315 withou= t checking whether INET6 is<br></div><div>defined.<br></div><div><br></d= iv><div>if_flags seems to be totally redundant, since the code at line 1= 315 will<br></div><div>invoke if_getflags(ifp) if !(if_flags & IFF_U= P) 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 in= terface drivers silently bring the interface up upon the first address a= ddition. Please see <a href=3D"https://cgit.freebsd.org/src/commit/= sys/netinet6?id=3Da77facd27368f618520d25391cfce11149879a41">https://cgit= .freebsd.org/src/commit/sys/netinet6?id=3Da77facd27368f618520d25391cfce1= 1149879a41</a> description for a more detailed explanation.</div><b= lockquote type=3D"cite" id=3D"qt" style=3D""><div><br></div><div>--<br><= /div><div>Gary Jennejohn<br></div><div><br></div><div><br></div></blockq= uote><div><br></div><div id=3D"sig132921232"><div class=3D"signature">/A= lexander<br></div></div><div><br></div></body></html> --198b55cd52044226aa60ed116c0f2a28--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e9bc5d62-a47f-4787-b9a7-267967ce1297>