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
diff --git a/server/RouteController.cpp b/server/RouteController.cpp
index ca888df..140c0d3 100644
--- a/server/RouteController.cpp
+++ b/server/RouteController.cpp
@@ -367,6 +367,10 @@
// 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) {