[bgpcfgd]: Fix bgpcfgd crash on reset Loopback0 ip addresses#5050
Merged
lguohan merged 2 commits intosonic-net:201811from Jul 28, 2020
Merged
[bgpcfgd]: Fix bgpcfgd crash on reset Loopback0 ip addresses#5050lguohan merged 2 commits intosonic-net:201811from
lguohan merged 2 commits intosonic-net:201811from
Conversation
Also some typos were fixed
lguohan
reviewed
Jul 27, 2020
Collaborator
|
are you missing some changes in this pr? |
Collaborator
|
is this bug only affecting Loopback0? It is unclear how when this bug is triggered. |
Contributor
Author
lguohan
approved these changes
Jul 28, 2020
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also some typos were fixed
- Why I did it
Fix an error which causes bgpcfgd crash on invalid ip address. Before the fix we had an issue here. When either loopback ipv4 or ipv6 addresses were already set and bgpcfgd received another "SET" message for already set ip loopback address, bgpcfgd will send syslog message about ambiguous ip address (despite the fact that the address is good) and crash of bgpcfgd. With this change this behavior is changed: if we receive ip address and this ip address is already set, bgpcfgd will send this message to the syslog and return from the handler.
Fix typos
- How I did it
Return from the handler on invalid ip address
- How to verify it
Build an image, run on your dut. Add an interface entry with invalid ip address. bgpcfgd should not crash.
- Which release branch to backport (provide reason below if seleted)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)