This patch restores functionality of route-gateway's dhcp parameter, and 
expands it to support routes using vpn_gateway.

OpenVPN supports using a “dhcp” parameter for the "route-gateway” option, which 
involves intercepting the DHCP reply packet and extracting the gateway to use. 
However, the current implementation expects to have this information at the 
time of the initialisation of the route list, which will not happen, and so 
routes relying on this option are never added.

Rather than moving initialisation of the route list until after the route-delay 
(which can have a negative effect on the resolution of routes using FQDNs), 
this patch flags routes that require a DHCP gateway, and updates and defines 
them when a DHCP reply is received. If no reply is received in time, the routes 
are left undefined.

Currently in production use in Viscosity for macOS and Windows, no reported 
issues.

Signed-off-by: James Bekkema <ja...@sparklabs.com>

Thanks,
James

--
James Bekkema
SparkLabs Developer
https://www.sparklabs.com
https://twitter.com/sparklabs
supp...@sparklabs.com

Attachment: route-gateway-dhcp.diff
Description: Binary data

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to