freebsd-dev/tests/sys/netinet6
Alexander V. Chernikov 50fa27e795 netinet6: fix interface handling for loopback traffic
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

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.

PR:		265089
Reviewed by:	ae, bz(previous version)
Differential Revision:	https://reviews.freebsd.org/D35732
MFC after:	2 weeks
2022-07-10 12:47:47 +00:00
..
frag6 tests: Only log critical errors from scapy 2021-05-12 20:54:30 +02:00
divert.sh Proper check if divert(4) module is present by the relevant tests 2020-05-27 16:33:00 +00:00
exthdr.py tests: Only log critical errors from scapy 2021-05-12 20:54:30 +02:00
exthdr.sh ping: fix some man pages and tests after r368045 2020-11-26 04:55:02 +00:00
fibs6.sh Add basic test for net.fibs dynamic growth. 2020-09-10 19:25:51 +00:00
forward6.sh Add basic IPv4/IPv6 forwarding tests. 2020-03-10 19:52:19 +00:00
lpm6.sh ping: fix some man pages and tests after r368045 2020-11-26 04:55:02 +00:00
Makefile netinet6: add ip6_output() tests. 2022-07-07 10:09:28 +00:00
mld.py tests: Only log critical errors from scapy 2021-05-12 20:54:30 +02:00
mld.sh icmpv6: Fix mbuf change in mld 2019-11-18 21:59:47 +00:00
ndp.sh ndp tests: fix cleanup 2021-12-13 18:14:59 +01:00
output6.sh ping: fix some man pages and tests after r368045 2020-11-26 04:55:02 +00:00
proxy_ndp.sh netinet6: fix ndp proxying 2022-05-30 10:53:33 +00:00
redirect.py tests: Only log critical errors from scapy 2021-05-12 20:54:30 +02:00
redirect.sh Fix IPv6 regression introduced by r362900. 2020-07-03 08:06:26 +00:00
scapyi386.py tests: Only log critical errors from scapy 2021-05-12 20:54:30 +02:00
scapyi386.sh Reenable netinet6 and netpfil tests on i386, net/scapy 2.4.3_2 contains the fix 2019-11-08 18:56:02 +00:00
test_ip6_output.py netinet6: fix interface handling for loopback traffic 2022-07-10 12:47:47 +00:00