From nobody Wed Sep 07 04:04:12 2022 X-Original-To: dev-commits-src-main@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 4MMpY12x1dz4bQjH; Wed, 7 Sep 2022 04:04:21 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MMpY02t3rz3TgX; Wed, 7 Sep 2022 04:04:20 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 28744DBv006433 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 6 Sep 2022 21:04:13 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 28744CRV006432; Tue, 6 Sep 2022 21:04:12 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 6 Sep 2022 21:04:12 -0700 From: Gleb Smirnoff To: "Bjoern A. Zeeb" 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: References: <202208302249.27UMnSwI022109@gitrepo.freebsd.org> <6q6n8553-2143-n24p-4816-406549997s@mnoonqbm.arg> <15on1poo-pnpq-3pos-qs7s-673pp1q0s83@serrofq.bet> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15on1poo-pnpq-3pos-qs7s-673pp1q0s83@serrofq.bet> X-Rspamd-Queue-Id: 4MMpY02t3rz3TgX X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org X-Spamd-Result: default: False [-3.10 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; ARC_NA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[glebius]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sun, Sep 04, 2022 at 06:39:53AM +0000, Bjoern A. Zeeb wrote: B> > B> > Author: Gleb Smirnoff B> > B> > AuthorDate: 2022-08-30 22:09:21 +0000 B> > B> > Commit: Gleb Smirnoff 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