Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Sep 2022 21:04:12 -0700
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        "Bjoern A. Zeeb" <bz@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: e72c522858cb - main - divert(4): make it compilable and working without INET
Message-ID:  <YxgYPD2WT35sRxV9@FreeBSD.org>
In-Reply-To: <15on1poo-pnpq-3pos-qs7s-673pp1q0s83@serrofq.bet>
References:  <202208302249.27UMnSwI022109@gitrepo.freebsd.org> <6q6n8553-2143-n24p-4816-406549997s@mnoonqbm.arg> <YxQ9Shj2Em3oe92s@FreeBSD.org> <15on1poo-pnpq-3pos-qs7s-673pp1q0s83@serrofq.bet>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 04, 2022 at 06:39:53AM +0000, Bjoern A. Zeeb wrote:
B> > B> > Author:     Gleb Smirnoff <glebius@FreeBSD.org>
B> > B> > AuthorDate: 2022-08-30 22:09:21 +0000
B> > B> > Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
B> > B> > CommitDate: 2022-08-30 22:09:21 +0000
B> > B> >
B> > B> >    divert(4): make it compilable and working without INET
B> > B> >
B> > B> >    Differential revision:  https://reviews.freebsd.org/D36383
B> > B>
B> > B> Well, almost at least....
B> >
B> > I wonder why LINT-NOINET builds without this??
B> 
B> I wondered the same last night.. I would be good to find out?

Ok, I think that assumption that sysctl parts of divert require
INET were just wrong, that's why LINT-NOINET builds.

With removed dependency on IPFIREWALL (just pushed) I can exclude
INET from my custom kernel and then run:

kyua test -k /usr/tests/sys/netinet6/Kyuafile divert:ipdivert_ip6_output_remote_success 

And it fails! :) But wait a second here. It fails because Python's
scapy module spews warnings on an INET-less kernel:

>>> import scapy.all
netstat: sysctl: net.route.0.2.dump.0 estimate: Address family not supported by protocol family
WARNING: ioctl(SIOCGIFFLAGS) failed on vtnet0 !
WARNING: No IPv4 address found on vtnet0 !
WARNING: ioctl(SIOCGIFFLAGS) failed on lo0 !
WARNING: No IPv4 address found on lo0 !
WARNING: more ioctl(SIOCGIFFLAGS) failed on vtnet0 !
WARNING: more No IPv4 address found on vtnet0 !

Given that tests/sys/netinet6/divert.sh runs this python program
under atf_check control, and the latter fails if controlled
program reports anything to stderr.

So, if you run the test sequence by hand, skipping atf_check,
you would see that the test actually passes. The injected packet
successfully received by the stack and is counted. Thus, divert(4)
compiles and works without INET in kernel.

-- 
Gleb Smirnoff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YxgYPD2WT35sRxV9>