kernel-pfroute: Delete interfaces on RTM_IFANNOUNCE/IFAN_DEPARTURE events
authorTobias Brunner <tobias@strongswan.org>
Fri, 25 Jul 2014 16:07:08 +0000 (18:07 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 9 Sep 2014 08:56:15 +0000 (10:56 +0200)
commitf80093e2ee65f6b536a9df83da795fd2f91d77f8
tree09c8372fb81a7d903595be707df0d552462468d5
parentf8613abc8a89e26ccf33298cbdf8a5e8c4009d1f
kernel-pfroute: Delete interfaces on RTM_IFANNOUNCE/IFAN_DEPARTURE events

We actually never deleted cached interfaces.  So if the kernel reuses
interface indices events for newly created interfaces could have been
associated with interface objects of deactivated and deleted interfaces.

Since we also didn't update the interface name when such an interface
got reactivated we ended up using the old name e.g. to install routes.

A trigger for this was the deletion and recreation of TUN devices during
reauthentication of SAs that use virtual IPs.
src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c