From nobody Fri Jun 02 18:57:40 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QXshT2PPFz4YTbP for ; Fri, 2 Jun 2023 18:58:01 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXshT1slRz3wLG for ; Fri, 2 Jun 2023 18:58:01 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685732281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5RFi+o9Myd4qvhSe83AF1b6L3gUHbSNAAlHz8eZkJMI=; b=EVc12E2ca554n1qgAJ1KoW/TiLISWYBOUkXzYuI12WU41e0Zl5FzpqOeVStwfCDCOtaFra nLli/ix4r3DIdS4yC6fERSXHj17siXYCKo7AU3ZDW01HEo6sFRtn72CXIVSlPS8/s/bjB/ UHkD90+ep6U+/onrxgfTNbY2CicGVbi6umvDj7qy9GnIKNvfMMJsO+xaM0ooDUk8MMznX9 OnSc1QOYbR962kT1kErEvUWzcFMWBZ6iSuAWQRES0udxLJ2F0E8FsMiFkKBcpi0cZEibWH 22C+Qe+E3cveaRS0pCxC4K3Z0J/1loOLZfRmDh3IRm8CfFXZXbbNdyRaaK0w1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685732281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5RFi+o9Myd4qvhSe83AF1b6L3gUHbSNAAlHz8eZkJMI=; b=rQh4CQganT2SrCxeBQZM4swfqTf2Hm2X6XLTMkPxku++mt/KMpfwLgeHQ1YX7uCFiEH0MM PrEaFmyavKl/kfIBfeYx2S9AA1rxsNSmjXH7zGp6iqUBp19glxHkZNxgKwuVq1/rMB9PBm Wo8j6e8M6o0ILRXDKRBh9D26Yel5av8wfTTFAwBGXluny9faBEgrqFvgZaGKCa7mh6Nw3D cNCwlVOkZ6/+0188+bs17y7y9fnaygrSqEYY3Izvp9etPBVA2KspH6vJtJ4vIp/mLal+ks lo5FfZfPeUDyd6knoC/9DIFLr6a+vRePHY9utCIklrpXr/DoRnsMZwlJO+KN9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685732281; a=rsa-sha256; cv=none; b=TW6qBtmvFn50zjl3zWup+R7woApWTMgZubLrizZx7yHPFIxXvV8rL9x9ucY9jRm3uN9bQu yfhxqj+9O/mCoVAb3G8vqlAT1N3sYBCoAIdd+/o2N88z7UXqbc/2N3cyXlA4S+cRYKrSo+ 4GTkZ4OHSwcVFzsYENFqhqpX7NdBS7wOSn/SPum8w/us9xwCebdR8wGwf7+7eIq8LDOokp Mn7pCRZUJ/oc+NtZkrCUSdwKoz/91taFgly21vCECglWsgGvMyiyohquMcqp9HcfeICbS1 0CrmlQ4fqmzFYEfZJP2rPR/NJxCgp0BvqnipbN8LZSBYIi1Nlldm5NovuFtPdg== Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: melifaro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QXshT0mwrz1Bj6 for ; Fri, 2 Jun 2023 18:58:01 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 67E6D27C0054 for ; Fri, 2 Jun 2023 14:58:00 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Fri, 02 Jun 2023 14:58:00 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelfedguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrg dtreerreerjeenucfhrhhomhepfdetlhgvgigrnhguvghrucevhhgvrhhnihhkohhvfdcu oehmvghlihhfrghroheshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepge dvjedtieejvedttdffvddttefgteevhedtgfeuveejjeekfedtveelgfekgeffnecuffho mhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepmhgvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufedvledvuddvfedvqddvleefiedutdegkedqmhgvlhhifhgrrhhopeephfhrvg gvuefuffdrohhrghesmhhplhhsrdhivg X-ME-Proxy: Feedback-ID: i02494642:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 34A702D4008E; Fri, 2 Jun 2023 14:58:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-447-ge2460e13b3-fm-20230525.001-ge2460e13 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 Message-Id: In-Reply-To: <20230602173055.583db61d@ernst.home> References: <20230602115644.7ce88b9f@ernst.home> <20230602115940.7c9d2f4e@ernst.home> <20230602173055.583db61d@ernst.home> Date: Fri, 02 Jun 2023 19:57:40 +0100 From: "Alexander Chernikov" To: freebsd-current@freebsd.org Subject: Re: Error building kernel in current Content-Type: multipart/alternative; boundary=198b55cd52044226aa60ed116c0f2a28 X-ThisMailContainsUnwantedMimeParts: N --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 wrote: >=20 > > On Fri, 2 Jun 2023 09:56:44 +0000 > > Gary Jennejohn 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

= On Fri, 2 Jun 2023, at 4:30 PM, Gary Jennejohn wrote:
On Fri, 2 Jun 2023 09:59:40 += 0000
Gary Jennejohn <ga= ryj@gmx.de> wrote:

> On Fri, 2 Ju= n 2023 09:56:44 +0000
> Gary Jennejohn <garyj@gmx.de> wrote:
>
> > Error building kernel in current:
> = >
> > -------------------------------------------= -------------------
> > >>> stage 3.1: buil= ding everything
> > --------------------------------= ------------------------------
> > /usr/src/sys/netl= ink/route/iface.c:1315:22: error: use of undeclared
> &= gt; identifier 'if_flags'
> >    = ;     if (error =3D=3D 0 && !(if_flags &= IFF_UP) && (if_getflags(ifp) & IFF_UP))
> = >           &n= bsp;           &n= bsp;     ^
> > 1 error generated= .
> > --- iface.o ---
> > *** [i= face.o] Error code 1
Sorry for the breakage, = I=E2=80=99ll fix it in a couple of hours.
> >
> > My source t= ree 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.&nbs= p; The failure occurs while building the kernel, so I fixed
> Subject accordingly.
>

<= div>OK, this is another INET6 error.  I don't have INET6 enabled.

At line 1280 we have:
#ifdef I= NET6
int if_flags =3D if_getflags(ifp);
#end= if

and if_flags is used at line 1315 withou= t checking whether INET6 is
defined.

if_flags seems to be totally redundant, since the code at line 1= 315 will
invoke if_getflags(ifp) if !(if_flags & IFF_U= P) is true.
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 https://cgit= .freebsd.org/src/commit/sys/netinet6?id=3Da77facd27368f618520d25391cfce1= 1149879a41 description for a more detailed explanation.

--
<= /div>
Gary Jennejohn



/A= lexander

--198b55cd52044226aa60ed116c0f2a28--