[strongSwan-dev] [PATCH] fix network interface deletion handling

Mirko Parthey mirko.parthey at informatik.tu-chemnitz.de
Sun Nov 13 11:45:07 CET 2011


Hi,
this patch is a followup to my most recent bug report on the users list:

When the kernel reports the deletion of an interface (RTM_DELLINK),
the cached interface attributes, including ifindex, become invalid
and must be forgotten.

Interface link state changes ("up" and "down") show up as RTM_NEWLINK,
so they will not cause a cached entry to be removed or
prevent listening to address change notifications.

Once an interface has been deleted, the kernel ought to stop sending
notifications for it. If the interface gets recreated with the same
name later, the kernel again reports RTM_NEWLINK, which causes a new
cache entry to be created.

There should be no reason to keep a stale cache entry around, as was
claimed in the comment.

Regards,
Mirko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interface-delete.diff
Type: text/x-diff
Size: 914 bytes
Desc: not available
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20111113/62b5e11a/attachment.diff>


More information about the Dev mailing list