Page MenuHomeFreeBSD

Fix ifa refcount leak during route addition.
ClosedPublic

Authored by melifaro on Feb 12 2021, 8:57 PM.
Tags
None
Referenced Files
F163424343: D28629.diff
Thu, Jul 23, 2:28 AM
Unknown Object (File)
Sun, Jul 12, 12:14 AM
Unknown Object (File)
Thu, Jul 2, 1:48 AM
Unknown Object (File)
Jun 20 2026, 11:22 PM
Unknown Object (File)
Jun 20 2026, 4:23 AM
Unknown Object (File)
Jun 19 2026, 12:24 AM
Unknown Object (File)
Jun 9 2026, 6:03 PM
Unknown Object (File)
May 18 2026, 8:34 PM
Subscribers

Details

Reviewers
rstone
Group Reviewers
network
Summary

Routing code relies on stable ifa's during route creation.
This is needed due to the fact that nhop objects stores (referenced) ifa object for the whole nhop object lifetime.

To avoid the situation when ifa gets scheduled for the deleted during the route addition process, rt_getifa_fib() references found ifa as soon as possible.

Plug refcount leak by freeing ifa reference immediately after creating nexthop, regardless of the result.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36943
Build 33832: arc lint + arc unit