Page MenuHomeFreeBSD

Fix ifa refcount leak during route addition.
ClosedPublic

Authored by melifaro on Feb 12 2021, 8:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 10 2024, 6:29 AM
Unknown Object (File)
Dec 20 2023, 4:39 AM
Unknown Object (File)
Dec 12 2023, 1:46 AM
Unknown Object (File)
Aug 16 2023, 8:44 AM
Unknown Object (File)
May 3 2023, 10:37 PM
Unknown Object (File)
Mar 2 2023, 4:31 PM
Unknown Object (File)
Feb 15 2023, 6:20 AM
Unknown Object (File)
Feb 13 2023, 4:31 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