Re: Error building kernel in current

From: Gary Jennejohn <garyj_at_gmx.de>
Date: Fri, 02 Jun 2023 15:30:55 UTC
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
> >
> > 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.

--
Gary Jennejohn