-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ospfd: fix deferred shutdown handling #14870
ospfd: fix deferred shutdown handling #14870
Conversation
looks much much better. |
4027970
to
f87d512
Compare
I've just pushed an update clearing those two remaining lists that I missed in my first iteration :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
```### AddressSanitizer error in topotest
|
@donaldsharp #14886 fixes a problem in the opaque LSA code responsible for this heap-use-after-free. Once that PR is merged, I'll rebase this one and the CI should pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
* On ospf_terminate(), proceed to clear the ospfd global variables even when no OSPF instance is configured * Remove double call to route_map_finish() * Call ospf_opaque_term() to clear the opaque LSA infrastructure * Clear the `OspfRI.area_info` and `om->ospf` global lists. Signed-off-by: Renato Westphal <[email protected]>
The ospfd cleanup code is relatively complicated given the need to appropriately handle the "max-metric router-lsa on-shutdown (5-100)" command. When that command is configured and an OSPF instance is unconfigured, the removal of the instance should be deferred to allow other routers sufficient time to find alternate paths before the local Router-LSAs are flushed. When ospfd is killed, however, deferred shutdown shouldn't take place and all instances should be cleared immediately. This commit fixes a problem where ospf_deferred_shutdown_finish() was prematurely exiting the daemon when no instances were left, inadvertently preventing ospf_terminate() from clearing the ospfd global variables. Additionally, the commit includes code refactoring to enhance readability and maintainability. Fixes FRRouting#14855. Signed-off-by: Renato Westphal <[email protected]>
f87d512
to
3e2f053
Compare
CI:rerun |
1 similar comment
CI:rerun |
Fixes #14855