summaryrefslogtreecommitdiffstats
path: root/forward.c
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2011-06-12 01:14:36 +0000
committerJames Yonan <james@openvpn.net>2011-06-12 01:14:36 +0000
commit7fb0e07ec3f7c5f6514523085dbe02ea6b8933e2 (patch)
treede7e157cc9c513a1870ae9bce16b04fd908e9295 /forward.c
parent759873034018f597e52dfbbfe91ff9d20530ea91 (diff)
downloadopenvpn-7fb0e07ec3f7c5f6514523085dbe02ea6b8933e2.tar.gz
openvpn-7fb0e07ec3f7c5f6514523085dbe02ea6b8933e2.tar.xz
openvpn-7fb0e07ec3f7c5f6514523085dbe02ea6b8933e2.zip
Added redirect-gateway block-local flag, with support for
Linux, Mac OS X, and Linux. This flag (which is pushable from server) blocks client access to local LAN while VPN session is active. Added standalone --show-gateway option to show info about default gateway. Extensively refactored get_default_gateway function in route.c to ease implementation of block-local. Removed "Experimental" disclaimer from redirect-gateway man page. Version 2.1.3y. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7334 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'forward.c')
-rw-r--r--forward.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/forward.c b/forward.c
index 90b7d9f..758f402 100644
--- a/forward.c
+++ b/forward.c
@@ -1015,7 +1015,7 @@ process_ipv4_header (struct context *c, unsigned int flags, struct buffer *buf)
if (!c->options.passtos)
flags &= ~PIPV4_PASSTOS;
#endif
- if (!c->options.route_gateway_via_dhcp || !route_list_default_gateway_needed (c->c1.route_list))
+ if (!c->options.route_gateway_via_dhcp || !route_list_vpn_gateway_needed (c->c1.route_list))
flags &= ~PIPV4_EXTRACT_DHCP_ROUTER;
if (buf->len > 0)
@@ -1056,7 +1056,7 @@ process_ipv4_header (struct context *c, unsigned int flags, struct buffer *buf)
{
const in_addr_t dhcp_router = dhcp_extract_router_msg (&ipbuf);
if (dhcp_router)
- route_list_add_default_gateway (c->c1.route_list, c->c2.es, dhcp_router);
+ route_list_add_vpn_gateway (c->c1.route_list, c->c2.es, dhcp_router);
}
}
}