Page MenuHomeFreeBSD

Fix ifa refcount leak during route addition.
AcceptedPublic

Authored by melifaro on Feb 12 2021, 8:57 PM.

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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 36943
Build 33832: arc lint + arc unit