Page MenuHomeFreeBSD

Fix ifa refcount leak during route addition.
ClosedPublic

Authored by melifaro on Feb 12 2021, 8:57 PM.
Tags
None
Referenced Files
F112592358: D28629.id.diff
Thu, Mar 20, 6:20 AM
Unknown Object (File)
Sun, Mar 9, 2:58 PM
Unknown Object (File)
Sat, Mar 8, 5:06 PM
Unknown Object (File)
Wed, Feb 26, 10:26 PM
Unknown Object (File)
Tue, Feb 25, 11:59 PM
Unknown Object (File)
Jan 30 2025, 7:56 AM
Unknown Object (File)
Jan 16 2025, 9:05 AM
Unknown Object (File)
Jan 14 2025, 2:11 AM
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