-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a static route with a gateway nexthop is created, the nexthop is sent to zebra for NHT, and added to a local hash. When the nexthop's VRF is deleted from kernel, nexthop still stays in the hash. This is a memory leak, because it is never deleted from there. Even if the VRF is recreated in kernel, it is assigned with a new `vrf_id` so the old hash entry is not reused, and a new one is created. To fix the issue, remove all nexthops from the hash when the corresponding VRF is deleted, do not add nexthops to the hash if their corresponding VRF doesn't exist in kernel and don't add the same nexthop to the hash multiple times. Signed-off-by: Igor Ryzhov <[email protected]>
- Loading branch information
Showing
1 changed file
with
6 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters