https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291437
Bug ID: 291437
Summary: wireguard: wg interfaces creates routes in incorrect
fib when Table= specified
Product: Base System
Version: 14.3-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: misc
Assignee: [email protected]
Reporter: [email protected]
Using the config
# wg0.conf
[Interface]
Address = 192.168.100.1/24
Table = 4
...
It would be expected that the wg0 interface would be added to fib 4, and all
addresses and routes created in that fib.
However, during startup of the interface the following is observed:
# service wireguard onestart
[#] ifconfig wg create name wg0
[#] wg setconf wg0 /dev/stdin
[#] ifconfig wg0 inet 192.168.100.1/24 alias
[#] ifconfig wg0 mtu 1420
[#] ifconfig wg0 up
[#] route -q -n add -inet -fib 4 192.168.100.2/32 -interface wg0
[+] Backgrounding route monitor
[#] wg set wg0 private-key /usr/local/etc/wireguard/server_private.key
The interface is *never* added to fib 4, leaving the system in a weird state,
where wg0 is in fib 0
# netstat -rn -F0
...
192.168.100.0/24 link#12 U wg0
192.168.100.1 link#6 UHS lo0
But the route for peers are in fib 4
# netstat -rn -F4
192.168.100.2 link#12 UHS wg0
This makes it hard to understand "where" peer traffic will be routed - fib 4 ?
or fib 0?
## Expected Behaviour
When Table = is specified, the wg interface should be added to the same fib.
## Work Around
The following can be set in wg0.conf to undo the incorrect address, and move
the interface to the correct fib.
PostUp = ifconfig %i inet 192.168.100.1/24 -alias
PostUp = ifconfig %i fib 4
PostUp = ifconfig %i inet 192.168.100.1/24 alias
--
You are receiving this mail because:
You are the assignee for the bug.