Weirdness with same-host IPv6 packets
- Reply: Dustin Marquess : "Re: Weirdness with same-host IPv6 packets"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Dec 2021 21:54:44 UTC
I'm seeing a weird issue with -CURRENT that I don't recall seeing
before. It started at least a couple of weeks back and a new build
from yesterday still shows it. UDP packets inside a host using the
host's non-loopback address seems to get dropped. TCP does work,
however there's a delay, almost like the first packet or two also got
dropped. I don't have any firewalling active, and stopping the VNET
jails didn't have any effect.
I've been using the machine's local IPv6 IP in /etc/resolv.conf for a
while. I noticed that logins were taking longer than usual and tracked
it down to unbound not responding. If I change /etc/resolv.conf to use
::1 or the host's IPv4 IP, then it works fine. The host's IPv6 IP does
work from outside the host, however. I thought it was maybe a weird
unbound bug, so I did some testing with netcat.
Current ifconfg (other interfaces removed for brevity):
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xb
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
bridge2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
ether 58:9c:fc:10:f4:55
inet 192.168.4.101 netmask 0xffffff00 broadcast 192.168.4.255
inet 192.168.4.12 netmask 0xffffffff broadcast 192.168.4.12
inet6 2001:470:bc52:4::101 prefixlen 64
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: tap2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 16 priority 128 path cost 2000000
member: lagg0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 12 priority 128 path cost 2000000
nd6 options=1<PERFORMNUD>
groups: bridge
Routing table:
Internet:
Destination Gateway Flags Netif Expire
default 192.168.4.1 UGS bridge2
127.0.0.1 link#11 UH lo0
192.168.4.0/24 link#19 U bridge2
192.168.4.12 link#19 UH lo0
192.168.4.101 link#19 UHS lo0
Internet6:
Destination Gateway Flags
Netif Expire
::/96 ::1 UGRS lo0
default 2001:470:bc52:4::1 UGS bridge2
::1 link#11 UHS lo0
::ffff:0.0.0.0/96 ::1 UGRS lo0
2001:470:bc52:4::/64 link#19 U bridge2
2001:470:bc52:4::101 link#19 UHS lo0
fe80::/10 ::1 UGRS lo0
fe80::%lo0/64 link#11 U lo0
fe80::1%lo0 link#11 UHS lo0
ff02::/16 ::1 UGRS lo0
Testing:
I started a listener:
$ nc -6 -u -l 5555
And in another window, did:
$ echo testing | nc -6 -u ::1 5555 <-- Works
$ echo testing | nc -6 -u 2001:470:bc52:4::101 5555 <-- Never
receives the packet
[ Previous command from a different host DOES work, however]
Switching to TCP:
$ echo testing | nc -6 ::1 5555 <--- Works
$ echo testing | nc -6 2001:470:bc52:4::101 5555 <-- Works, after a
delay however
Trying IPv4:
$ echo testing | nc -u 127.0.0.1 5555 <--- Works
$ echo testing | nc -u 192.168.4.101 5555 <--- Works, no delay
So IPv4 is working fine, which is strange.
Has anybody else seen this and have any insight?
-Dustin