kernel-netlink: Change how routes are un-/installed
authorTobias Brunner <tobias@strongswan.org>
Thu, 19 Apr 2018 16:15:24 +0000 (18:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 22 May 2018 08:04:24 +0000 (10:04 +0200)
commit10b8acb554d5873ef29641d593cce1573f89e2e1
treedd82c6d85372a3c9533d0327e5b5b90412bfc599
parent3f003e5e2128edc7d17871293ecb9562550fbc20
kernel-netlink: Change how routes are un-/installed

We now check if there are other routes tracked for the same destination
and replace the installed route instead of just removing it.  Same during
installation, where we previously didn't replace existing routes due to
NLM_F_EXCL.  Routes with virtual IPs as source address are preferred over
routes without.

This should allow using trap policies with virtual IPs on Linux.

Fixes #85, #2162.
src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c