-
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
bfdd: fix broken FSM in active mode #11077
Conversation
With the simple BFD configuration - (active mode, single hop, without other parameters) ``` ! bfd peer 11.11.11.11 exit ! ``` The interface with 11.11.11.0/24 is a *virtual* interface, which can be deleted. After BFD FSM is created and session is ok, do these things: 1) delete this interface 2) create this interface 3) set same ip address in this interface Now, everything seems completely restored because all configuration is same. But bad thing happens, BFD session hang on "down" status - ``` root# show bfd peer 11.11.11.11 BFD Peer: peer 11.11.11.11 vrf default ID: 638815827 Remote ID: 0 Active mode Status: down Downtime: 3 second(s) Diagnostics: path down <- caused by destroyed interface Remote diagnostics: ok ``` With the interface creating, `bfdd_sessions_enable_interface()` wrongly compares added interface with the created, even key of this `bfd_session` isn't binded with any interface. So this `bfd_session` will hang on "down" status for ever. So skip the compare in this case (no interface in key) to wake up this `bfd_session`. Signed-off-by: anlan_cs <vic.lan@pica8.com>
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: No useful log foundSuccessful on other platforms/tests
|
ci:rerun |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5029/ This is a comment from an automated CI system. |
With the simple BFD configuration -
(active mode, single hop, without other parameters)
The interface with 11.11.11.0/24 is a virtual interface,
which can be deleted.
After BFD FSM is created and session is ok, do these things:
Now, everything seems completely restored because all configuration
is same. But bad thing happens, BFD session hang on "down" status -
With the interface creating,
bfdd_sessions_enable_interface()
wrongly compares added interface with the created, even key of
this
bfd_session
isn't binded with any interface. So thisbfd_session
will hang on "down" status for ever.So skip the compare in this case (no interface in key) to wake up
this
bfd_session
.Signed-off-by: anlan_cs vic.lan@pica8.com