Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Oct 2023 00:00:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 274618] if_wg sometimes configured badly and then sent IPv4 packets with src=0.0.0.0
Message-ID:  <bug-274618-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274618

            Bug ID: 274618
           Summary: if_wg sometimes configured badly and then sent IPv4
                    packets with src=3D0.0.0.0
           Product: Base System
           Version: 13.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: vova@fbsd.ru

13.2-RELEASE-p4

# ifconfig wg0
wg0: flags=3D80c1<UP,RUNNING,NOARP,MULTICAST> metric 0 mtu 1420
 options=3D80000<LINKSTATE>
 inet 172.16.1.254 netmask 0xffffffff
 groups: wg
 nd6 options=3D109<PERFORMNUD,IFDISABLED,NO_DAD>

# wg show
interface: wg0
  public key: ...
  private key: (hidden)
  listening port: 31766

peer: ...
  endpoint: 178.213.227.68:51111
  allowed ips: 172.16.1.0/24
  latest handshake: 17 minutes, 14 seconds ago
  transfer: 851 B received, 908 B sent

# route -n get 172.16.1.192
   route to: 172.16.1.192
destination: 172.16.1.0
       mask: 255.255.255.0
        fib: 0
  interface: wg0
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1420         1         0

Packets originating on WG interface without bind(2) looks ackward -
src_ip=3D0.0.0.0

TCP:=20
21:08:43.884120 IP 0.0.0.0.37253 > 172.16.1.192.22: Flags [S], seq 10466031=
87,
win 65535, options [mss 1380,nop,wscale 6,sackOK,TS val 3939364738 ecr 0],
length 0

ICMP:
21:03:04.934286 IP 0.0.0.0 > 172.16.1.192: ICMP echo request, id 17204, seq=
 8,
length 64

if, source address fixed with bind(2) (i.e. ping -S 172.16.1.254 ...) -
everything gets fine

problem appears just after reboot, to fix it is enough to restart wireguard:
service wireguard restart

problem does not appear if use wireguard-kmod-0.0.20220615_1

problem appears not every boot so, aproxymately - one of two or one of 4 bo=
ots
- everything fine
preloading any modules from boot/loader does not change situation

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274618-227>