openvpn tunnel subnet route netif is lo0 instead of tun0
Guy Yur
guyyur at gmail.com
Sat Feb 6 20:47:05 UTC 2016
Hi,
Between r286965 and r294555 openvpn ipv4 route added for subnet
topology on the server started being associated with lo0 instead of tun0.
This causes routing problems for clients other than the first.
Reverting r293159 solves the problem.
With r293159 the RTF_GATEWAY flag is not removed before calling
rtrequest1_fib.
I added some prints and I see rib_lookup_info returns 0
and ss.ss_family is 0.
Commands to replicate the issue manually:
ifconfig tun1 create
ifconfig tun1 192.168.170.1 192.168.170.2 mtu 1500 netmask 255.255.255.0 up
route add -net 192.168.170.0 192.168.170.1 255.255.255.0
Bad route for 192.168.170.0/24 with r293159:
# netstat -rnf inet | grep -e Destination -e 192.168.170
Destination Gateway Flags Netif Expire
192.168.170.0/24 192.168.170.1 UGS lo0
192.168.170.1 link#4 UHS lo0
192.168.170.2 link#4 UH tun1
Good route for 192.168.170.0/24 with r293159 reverted:
# netstat -rnf inet | grep -e Destination -e 192.168.170
Destination Gateway Flags Netif Expire
192.168.170.0/24 192.168.170.1 UGS tun1
192.168.170.1 link#4 UHS lo0
192.168.170.2 link#4 UH tun1
-- Guy
More information about the freebsd-net
mailing list