Date: Sat, 6 Feb 2016 22:47:03 +0200 From: Guy Yur <guyyur@gmail.com> To: freebsd-net@freebsd.org, melifaro@freebsd.org Subject: openvpn tunnel subnet route netif is lo0 instead of tun0 Message-ID: <CAC67Hz8GdvEicqLWo2YrMHcrzVb3qMPPcz3jjT8fa0gAK5MmVA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC67Hz8GdvEicqLWo2YrMHcrzVb3qMPPcz3jjT8fa0gAK5MmVA>