diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2009-05-24 09:13:58 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2009-05-24 09:13:58 +0000 |
commit | 775a6ac2796a55bad3489d8532fd138d232fd2c4 (patch) | |
tree | 9bfc8630549cfeb47ec741d1dafab3094d0c1bf5 /route.h | |
parent | Added "redirect-private" option which allows private subnets (diff) | |
download | openvpn-775a6ac2796a55bad3489d8532fd138d232fd2c4.tar.xz |
Added new 'autolocal' redirect-gateway flag. When enabled, the OpenVPN
client will examine the routing table and determine whether (a) the
OpenVPN server is reachable via a locally connected interface, or (b)
traffic to the server must be forwarded through the default router.
Only add a special bypass route for the OpenVPN server if (b) is true.
If (a) is true, behave as if the 'local' flag is specified, and do not
add a bypass route.
The new 'autolocal' flag depends on the non-portable test_local_addr()
function in route.c, which is currently only implemented for Windows.
The 'autolocal' flag will act as a no-op on platforms that have not
yet defined a test_local_addr() function.
Increased TLS_CHANNEL_BUF_SIZE to 2048 from 1024 (this will allow for
more option content to be pushed from server to client).
Raised D_MULTI_DROPPED debug level to 4 from 3.
Version 2.1_rc16b.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4446 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'route.h')
-rw-r--r-- | route.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -83,6 +83,7 @@ struct route_option { #define RG_BYPASS_DHCP (1<<3) #define RG_BYPASS_DNS (1<<4) #define RG_REROUTE_GW (1<<5) +#define RG_AUTO_LOCAL (1<<6) struct route_option_list { int n; @@ -105,6 +106,7 @@ struct route_list { struct route_special_addr spec; unsigned int flags; bool did_redirect_default_gateway; + bool did_local; int n; struct route routes[MAX_ROUTES]; }; @@ -159,6 +161,17 @@ bool is_special_addr (const char *addr_str); bool get_default_gateway (in_addr_t *ip, in_addr_t *netmask); +/* + * Test if addr is reachable via a local interface (return ILA_LOCAL), + * or if it needs to be routed via the default gateway (return + * ILA_NONLOCAL). If the current platform doesn't implement this + * function, return ILA_NOT_IMPLEMENTED. + */ +#define TLA_NOT_IMPLEMENTED 0 +#define TLA_NONLOCAL 1 +#define TLA_LOCAL 2 +int test_local_addr (const in_addr_t addr); + #if AUTO_USERID bool get_default_gateway_mac_addr (unsigned char *macaddr); #endif |