opnsense-src/sys
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
..
amd64 MIMIMAL: add uart 2022-07-01 11:24:51 -06:00
arm ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
arm64 Add RK3568 SoC support to pinctrl driver. 2022-07-09 13:06:52 +00:00
bsm
cam ses: don't panic if disk elements have really weird descriptors 2022-06-23 11:19:20 -06:00
cddl stand: Add blake3 support to boot loader 2022-07-08 22:57:59 -06:00
compat linux(4): Implement __vdso_time 2022-07-04 23:41:32 +03:00
conf cddl/*: add a WITH(OUT)_DTRACE option 2022-07-06 14:03:48 +01:00
contrib zfs: fixup build on powerpc64le 2022-07-08 18:52:14 -03:00
crypto OpenSSL: Regen assembly file for OpenSSSL 1.1.1q 2022-07-05 12:06:50 -04:00
ddb ddb: add _FLAGS command variants 2022-07-05 11:56:42 -03:00
dev wtap(4): Rename interface name 2022-07-09 01:29:15 +08:00
dts sys/dts: Remove MIPS files 2022-05-20 17:11:27 +01:00
fs nfscl: Initialize nfsess_badslots to zero 2022-07-09 16:12:31 -07:00
gdb ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
geom ses: don't panic if disk elements have really weird descriptors 2022-06-23 11:19:20 -06:00
gnu bwn: eliminate dead writes in BWN_GPL_PHY 2022-05-04 09:32:59 -04:00
i386 elfnote: place note in a PT_NOTE program header 2022-06-28 09:51:57 +02:00
isa isa: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-06 15:46:59 -07:00
kern sockets: fix setsockopt(SO_RCVTIMEO) on a listening socket 2022-07-08 11:33:24 -07:00
kgssapi kgssapi krb5: Remove unused variables. 2022-04-06 16:45:29 -07:00
libkern libkern: Fix a typo in a source code comment 2022-06-05 08:57:26 +02:00
modules rack/bbr: fix standalone kernel module build 2022-07-08 22:04:44 -07:00
net vxlan: Add support for socket ioctls SIOC[SG]TUNFIB 2022-07-08 18:14:19 +00:00
net80211 net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information 2022-06-17 22:55:13 +00:00
netgraph ng_ubt(4): Probe USB Bluetooth per USB interface and not per USB device. 2022-06-03 10:49:17 +02:00
netinet bbr: check proper flag for connection had been closed 2022-07-08 22:04:44 -07:00
netinet6 netinet6: fix interface handling for loopback traffic 2022-07-10 12:47:47 +00:00
netipsec ipsec_encap: setdf is only used for INET. 2022-04-13 16:08:21 -07:00
netpfil ipfilter: Support only jails in VNET 2022-07-07 07:53:45 -07:00
netsmb smb_smb_treedisconnect: eliminate write only variable mbp 2022-04-04 22:30:57 -06:00
nfs nfs: skip bootpc when vfs.root.mountfrom is other than nfs 2022-05-31 16:07:27 -03:00
nfsclient
nfsserver
nlm sys/nlm: Use C99 fixed-width integer types. 2021-12-28 09:42:42 -08:00
ofed sockets: use only soref()/sorele() as socket reference count 2022-07-04 12:40:51 -07:00
opencrypto crypto: Validate return values from CRYPTODEV_PROCESS() 2022-07-01 11:09:39 -04:00
powerpc subr_bus: restore bus_null_rescan() 2022-06-23 16:07:00 -03:00
riscv riscv: implement db_show_mdpcpu() 2022-07-05 11:51:14 -03:00
rpc krpc: Fix NFS-over-TLS for KTLS1.3 2022-05-15 11:51:56 -07:00
security mac_veriexec: Authorize reads of secured sysctls 2022-06-29 10:48:01 +02:00
sys tree(3): allow the compare function to return any signed type 2022-07-06 22:19:08 -07:00
teken teken: color #3 is yellow not brown - use TC_YELLOW as the name 2022-03-12 09:17:29 -05:00
tests
tools firmware: Map '@' in filenames to '_' in symbols. 2022-06-14 10:50:51 -07:00
ufs Bug fix to UFS/FFS superblock integrity checks when reading a superblock. 2022-07-06 14:45:30 -07:00
vm vm: Fix racy checks for swap objects 2022-06-20 12:48:14 -04:00
x86 ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
xdr sys/xdr: Use C99 fixed-width integer types. 2021-12-28 09:43:26 -08:00
xen xenbus: improve device tracking 2022-06-07 12:29:53 +02:00
Makefile Fix 'make cscope' with ALL_ARCH defined 2022-01-07 11:53:52 -04:00