Date: Sun, 10 Jul 2022 15:18:13 +0100 From: "Alexander V. Chernikov" <melifaro@ipfw.ru> To: "Bjoern A. Zeeb" <bz@FreeBSD.org> Cc: "Alexander V. Chernikov" <melifaro@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 50fa27e795ea - main - netinet6: fix interface handling for loopback traffic Message-ID: <71D08533-EE9B-439F-B8DD-1DF5C46D5862@ipfw.ru> In-Reply-To: <alpine.BSF.2.00.2207101330050.68830@ai.fobar.qr> References: <202207101248.26ACmWT1069733@gitrepo.freebsd.org> <alpine.BSF.2.00.2207101330050.68830@ai.fobar.qr>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 10 Jul 2022, at 14:32, Bjoern A. Zeeb <bz@FreeBSD.org> wrote: >=20 > On Sun, 10 Jul 2022, Alexander V. Chernikov wrote: >=20 >> The branch main has been updated by melifaro: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D50fa27e795eaae97dae87ac4532799f7= aea87e9f >>=20 >> commit 50fa27e795eaae97dae87ac4532799f7aea87e9f >> Author: Alexander V. Chernikov <melifaro@FreeBSD.org> >> AuthorDate: 2022-07-10 12:27:23 +0000 >> Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> >> CommitDate: 2022-07-10 12:47:47 +0000 >>=20 >> netinet6: fix interface handling for loopback traffic >>=20 >> Currently, processing of IPv6 local traffic is partially broken: >> link-local connection fails and global unicast connect() takes >> 3 seconds to complete. >> This happens due to the combination of multiple factors. >> IPv6 code passes original interface "origifp" when passing >> traffic via loopack to retain the scope that is mandatory for the >> correct hadling of link-local traffic. First problem is that the = logic >> of passing source interface is not working correcly for TCP = connections, >> resulting in passing "origifp" on the first 2 connection attempts and >> lo0 on the subsequent ones. Second problem is that source address >> validation logic skips its checks iff the source interface is = loopback, >> which doesn't cover "origifp" case. >> More detailed description is available at = https://reviews.freebsd.org/D35732 >>=20 >> Fix the first problem by untangling&simplifying ifp/origifp logic. >> Fix the second problem by switching source address validation check = to >> using M_LOOP mbuf flag instead of interface type. >>=20 >> PR: 265089 >> Reviewed by: ae, bz(previous version) >=20 > I did not review, I had only commented on D35117. Sorry, I chose a wrong wording for mentioning the discussion happened. Do you prefer me to rollback/commit with an updated message? >=20 >=20 >> Differential Revision: https://reviews.freebsd.org/D35732 >> MFC after: 2 weeks >> --- >> sys/netinet6/ip6_input.c | 2 +- >> sys/netinet6/ip6_output.c | 61 ++++++++++++++++++----------------- >> tests/sys/netinet6/test_ip6_output.py | 4 +-- >> 3 files changed, 35 insertions(+), 32 deletions(-) >=20 > --=20 > Bjoern A. Zeeb r15:7
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71D08533-EE9B-439F-B8DD-1DF5C46D5862>