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:
committed by
Tobias Brunner
co-authored by
Tobias Brunner
parent
4958acc0c2
commit
09f4bccfea
@@ -614,26 +614,28 @@ METHOD(kernel_interface_t, del_ip, status_t,
|
||||
|
||||
METHOD(kernel_interface_t, add_route, status_t,
|
||||
private_kernel_interface_t *this, chunk_t dst_net,
|
||||
uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
|
||||
uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name,
|
||||
bool pass)
|
||||
{
|
||||
if (!this->net)
|
||||
{
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
return this->net->add_route(this->net, dst_net, prefixlen, gateway,
|
||||
src_ip, if_name);
|
||||
src_ip, if_name, pass);
|
||||
}
|
||||
|
||||
METHOD(kernel_interface_t, del_route, status_t,
|
||||
private_kernel_interface_t *this, chunk_t dst_net,
|
||||
uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
|
||||
uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name,
|
||||
bool pass)
|
||||
{
|
||||
if (!this->net)
|
||||
{
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
return this->net->del_route(this->net, dst_net, prefixlen, gateway,
|
||||
src_ip, if_name);
|
||||
src_ip, if_name, pass);
|
||||
}
|
||||
|
||||
METHOD(kernel_interface_t, bypass_socket, bool,
|
||||
|
||||
Reference in New Issue
Block a user