OpenVPN / openvpn

OpenVPN is an open source VPN daemon
http://openvpn.net
Other
10.25k stars 2.92k forks source link

support freebsd's fib feature #550

Open cnbatch opened 1 month ago

cnbatch commented 1 month ago

This patch is to support FreeBSD's FIB feature.

When using FreeBSD's setfib command to launch OpenVPN in other FIB (routing table), the interface's IP address was not added to correct routing table, and then the routing entries couldn't be added successfully: https://forums.freebsd.org/threads/freebsd-14-and-route-in-non-zero-fib.91099/ https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278295

This is duo to ifconfig command does not retrieve FIB number of current envirnment which is set by setfib. It only accepts fib N parameter. route command can retrieve FIB number of current envirnment, the following routing entries will be added to correct routing table. But if the interface's IP address was not added correct routing table, route command will fail.

schwabe commented 1 month ago

I am wondewring if the ifconfig behaviour is intended behaviour or if we working around a bug in ifconfig here in OpenVPN.

schwabe commented 1 month ago

There are also build failures related to macOS.

flichtenheld commented 1 month ago

There are also build failures related to macOS.

Yeah, these are related to the code that was not moved correctly.