trac#261 / fix for --redirect-private
Hi,
the following patch was posted to trac#261, and I intend to ACK it (patches to track are a bit complicated regarding our standard policy and --author :-/ - but it's simple enough, and while a very esoteric corner case, fixing a real bug :-) - namely, --redirect-private in combination with --dev tap)
Specifically, --redirect-private does half the work of --redirect-gateway, namely "install a host route to the VPN server via the current default gateway", but not the actual "... and then redirect everything else into the VPN". This can be useful if you push the same private network that is used at the client site, but do *not* want to push a default route.
This normally works, unless used in tap mode with routes coming from a DHCP server, where it complains about missing --route-gateway, which isn't actually needed for *this* part of the work.
gert
src/openvpn/route.c +0 -0
src/openvpn/route.c +1 -1
@@ -837,7 +837,7 @@ redirect_default_route_to_vpn (struct route_list *rl, const struct tuntap *tt, uif ( rl && rl->flags &RG_ENABLE ) { -if (!(rl->spec.flags &RTSA_REMOTE_ENDPOINT )) +if (!(rl->spec.flags &RTSA_REMOTE_ENDPOINT ) && (rl->flags &RG_REROUTE_GW )) {msg (M_WARN ,"%s VPN gateway parameter (--route-gateway or --ifconfig) is missing" , err); }
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...PATCH 1/1 Fix --redirect-gateway in --dev tap mode.
ACK.
Your patch has been applied to the master and release/2.3 branch.
commit 1e2b229e5140b784820906feb8446e47c1ecc62e (master) commit 5502af840205a8a9342600385fcd4ef2919073ba (release/2.3)
Author: Guy Yur <[email protected]...> Date: Mon Jun 1 21:51:13 2015 +0200
Fix --redirect-private in --dev tap mode.
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9761
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering