Page MenuHomeFreeBSD

net: on interface detach purge all its routes before detaching protocols
ClosedPublic

Authored by glebius on Thu, Jan 15, 3:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 15, 8:01 PM
Unknown Object (File)
Thu, Jan 15, 5:18 PM
Unknown Object (File)
Thu, Jan 15, 4:49 PM
Unknown Object (File)
Thu, Jan 15, 1:14 PM
Unknown Object (File)
Thu, Jan 15, 1:09 PM
Unknown Object (File)
Thu, Jan 15, 6:06 AM
Unknown Object (File)
Thu, Jan 15, 5:26 AM

Details

Summary

Otherwise, a forwarding thread may use the interface being detached. This
is a regression from 0d469d23715d, which manifests itself as a reliably
reproducible panic in in6_selecthlim(). Note that there are old bug
reports about such a panic, and I believe this change will not fix them,
as their nature is not due to a screwed up detach sequence, but due to
lack of proper epoch(9) based synchronization between the detach and
forwarding.

Reported & tested by: jhibbits
PR: 292162
Fixes: 0d469d23715d690b863787ebfa51529e1f6a9092

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69896
Build 66779: arc lint + arc unit

Event Timeline

I will test it with openbgp and bird.
I suspect that removing routes before detaching the actual interface might cause unexpected behavior in them.

LGTM
I also tested interface creation and destruction to advertise/withdraw its routes with bird3 (ospf) and openbgpd8.

This revision is now accepted and ready to land.Fri, Jan 16, 3:01 PM