diff options
| author | Lorenzo Colitti <lorenzo@google.com> | 2014-09-18 16:01:50 +0900 |
|---|---|---|
| committer | Lorenzo Colitti <lorenzo@google.com> | 2014-09-19 10:56:29 +0900 |
| commit | 4c95a125e0930c112555437589f7620575482095 (patch) | |
| tree | d7ea3681e0bb8d9036536279352ced736d80140c /server/RouteController.cpp | |
| parent | 6a834abb5acca22e47b70ee88e55f394f909559b (diff) | |
| download | platform_system_netd-4c95a125e0930c112555437589f7620575482095.tar.gz platform_system_netd-4c95a125e0930c112555437589f7620575482095.tar.bz2 platform_system_netd-4c95a125e0930c112555437589f7620575482095.zip | |
Support manipulating throw routes.
We already supported unreachable routes. Throw routes are
necessary so we can exempt the VPN endpoint from being routed
through the VPN in legacy VPN modes that do not pass traffic
through a tun or ppp interface but just directly appply IPsec
transformations to outgoing packets.
Bug: 17462989
Change-Id: I8635472ca3e96ec2866af2de48e6260ab2da13fb
Diffstat (limited to 'server/RouteController.cpp')
| -rw-r--r-- | server/RouteController.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/RouteController.cpp b/server/RouteController.cpp index ca888dfe8..140c0d37f 100644 --- a/server/RouteController.cpp +++ b/server/RouteController.cpp @@ -367,6 +367,10 @@ WARN_UNUSED_RESULT int modifyIpRoute(uint16_t action, uint32_t table, const char // unreachable routes, so nuke them. (IPv6 allows them to be specified; IPv4 doesn't.) interface = OIF_NONE; nexthop = NULL; + } else if (nexthop && !strcmp(nexthop, "throw")) { + type = RTN_THROW; + interface = OIF_NONE; + nexthop = NULL; } else { // If an interface was specified, find the ifindex. if (interface != OIF_NONE) { |
