kernel-netlink: Implement passthrough type routes and use them on Linux

Enables us to ignore any future kernel features for routes unless
we actually need to consider them for the source IP routes.

Also enables us to actually really skip IPsec processing for those networks
(because even the routes don't touch those packets). It's more what
users expect.

Co-authored-by: Tobias Brunner <[email protected]>
This commit is contained in:
Noel KuntzeandTobias Brunner authored and Tobias Brunner committed 2020-03-10 10:20:58 +01:00
1 parent 4958acc0c2
commit 09f4bccfea
11 files changed
+124 -80

No files matched your search

@@ -715,14 +715,14 @@ static status_t manage_route(private_kernel_iph_net_t *this, bool add,
METHOD(kernel_net_t, add_route, status_t,
private_kernel_iph_net_t *this, chunk_t dst, uint8_t prefixlen,
host_t *gateway, host_t *src, char *name)
host_t *gateway, host_t *src, char *name, bool pass)
{
return manage_route(this, TRUE, dst, prefixlen, gateway, name);
}
METHOD(kernel_net_t, del_route, status_t,
private_kernel_iph_net_t *this, chunk_t dst, uint8_t prefixlen,
host_t *gateway, host_t *src, char *name)
host_t *gateway, host_t *src, char *name, bool pass)
{
return manage_route(this, FALSE, dst, prefixlen, gateway, name);
}