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
F144376407: D54721.id.diff
Sun, Feb 8, 3:19 AM
Unknown Object (File)
Sat, Feb 7, 4:41 AM
Unknown Object (File)
Sat, Feb 7, 4:41 AM
Unknown Object (File)
Fri, Feb 6, 10:35 PM
Unknown Object (File)
Sat, Jan 31, 1:05 PM
Unknown Object (File)
Sat, Jan 31, 1:05 PM
Unknown Object (File)
Thu, Jan 29, 7:10 PM
Unknown Object (File)
Tue, Jan 27, 7:12 PM

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 Not Applicable
Unit
Tests Not Applicable

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