summaryrefslogtreecommitdiffstats
path: root/route.h
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2011-12-26 00:18:50 +0000
committerDavid Sommerseth <davids@redhat.com>2012-01-27 10:33:56 +0100
commit8fc83a2d6cfa44032f38e13fc2f7dbc096f584d9 (patch)
tree7e71254561a80527ae49099fbb41ea285503f06e /route.h
parent415421c24ac5b62d59fb8f03076521cba6f126cc (diff)
downloadopenvpn-8fc83a2d6cfa44032f38e13fc2f7dbc096f584d9.tar.gz
openvpn-8fc83a2d6cfa44032f38e13fc2f7dbc096f584d9.tar.xz
openvpn-8fc83a2d6cfa44032f38e13fc2f7dbc096f584d9.zip
Added support for "on-link" routes on Linux client
These are routes where the gateway is specified as an interface rather than an address. This allows redirect-gateway to work on Linux clients whose connection to the internet is via a point-to-point link such as PPP. Note that at the moment, this capability is incompatible with the "redirect-gateway block-local" directive -- this is because the block-local directive blocks all traffic from the local LAN except for the local and gateway addresses. Since a PPP link is essentially a subnet of two addresses, local and remote (i.e. gateway), the set of addresses that would be blocked by block-local is empty. Therefore, the "redirect-gateway block-local" directive will be ignored on PPP links. To view the OpenVPN client's current determination of the default gateway, use this command: ./openvpn --show-gateway git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7794 e7ae566f-a301-0410-adde-c780ea21d3b5 Signed-off-by: James Yonan <james@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'route.h')
-rw-r--r--route.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/route.h b/route.h
index 58c7ef4..25ecaee 100644
--- a/route.h
+++ b/route.h
@@ -46,9 +46,10 @@
#endif
/*
- * Route add flags (must stay clear of ROUTE_METHOD bits)
+ * Route add/delete flags (must stay clear of ROUTE_METHOD bits)
*/
-#define ROUTE_DELETE_FIRST 4
+#define ROUTE_DELETE_FIRST (1<<2)
+#define ROUTE_REF_GW (1<<3)
struct route_bypass
{
@@ -157,6 +158,7 @@ struct route_gateway_info {
# define RGI_HWADDR_DEFINED (1<<2) /* set if hwaddr is defined */
# define RGI_IFACE_DEFINED (1<<3) /* set if iface is defined */
# define RGI_OVERFLOW (1<<4) /* set if more interface addresses than will fit in addrs */
+# define RGI_ON_LINK (1<<5)
unsigned int flags;
/* gateway interface */