[Bug 290768] if_wg(4): handshake response has src and dst reverse

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 04 Nov 2025 16:40:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290768

--- Comment #2 from relvy <it@vineyard-sha.de> ---
More verbose tcpdump output:

tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on igc0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
17:23:13.401182 e0:28:6d:89:6b:02 > 00:00:5e:00:01:01, ethertype IPv4 (0x0800),
length 190: a.b.c.d.18457 > 192.168.178.2.51820: UDP, length 148
17:23:13.401227 00:90:27:e6:33:13 > e0:28:6d:89:6b:02, ethertype IPv4 (0x0800),
length 190: a.b.c.d.18457 > 192.168.178.2.51820: UDP, length 148

a.b.c.d is the public IP address of my peer. 192.168.178.2 is my CARP address
on the WAN side.
The first line is the handshake initiation from the peer.
The second line is the response thereof. Notice, the src IP and dst IP are
reversed while the MAC-Addresses are ok.

Layer 2 is ok.
The problem is in layer 3.

Maybe there is a bcopy() or memcpy() somewhere with src and dst arguments
swapped?

-- 
You are receiving this mail because:
You are the assignee for the bug.