kernel-netlink: Avoid route dump if routing rule excludes traffic with a certain...
authorTobias Brunner <tobias@strongswan.org>
Wed, 5 Aug 2015 14:51:38 +0000 (16:51 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 18 Aug 2015 10:06:08 +0000 (12:06 +0200)
commit6bd1216e7a8a41eb6c103c27a05f50871e1aef99
treeef4bf9aec5b84f3b1c0bbd2ee2d043393b1d5f5e
parent7ff7ce3ed661c8e20ce6b0bee1df340a03b5a4da
kernel-netlink: Avoid route dump if routing rule excludes traffic with a certain mark

If the routing rule we use to direct traffic to our own routing table
excludes traffic with a certain mark (fwmark = !<mark>) we can simplify
the route lookup and avoid dumping all routes by passing the mark to the
request.  That way our own routes are ignored and we get the preferred
route back without having to dump and analyze all routes, which is quite a
burden on hosts with lots of routes.
src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c