Fix Quagga/FRR parser on IPv6 BGP sessions#122
Conversation
|
@zhenggen-xu Could you please help review and test in your DUT? |
| l = ls[li] | ||
| if l.startswith('Neighbor '): | ||
| break | ||
| if l.startswith('No IPv'): # eg. No IPv6 neighbor is configured |
There was a problem hiding this comment.
Can we define these strings as constant at beginning so it would be easier to maintain? #Resolved
There was a problem hiding this comment.
I think this is a great idea. We could define a list of criteria to skip (with comments) at one place and check them in a loop here. #Resolved
There was a problem hiding this comment.
In my opinion, both the strings and the functions such as startswith or endswith are important. So keep them together help maintenance.
In reply to: 363017378 [](ancestors = 363017378)
There was a problem hiding this comment.
You could define 2 lists of strings. one for starts with and one for ends with. They are still defined together. And the code to make use of these 2 lists are also together. This way, the data and handling are separate. I think it is cleaner this way.
There was a problem hiding this comment.
We can improve this in future. This is a quick bug fix for 201811 FRR special use case required by @zhenggen-xu . Since it is tested by him, let's keep the code in this PR.
Test worked fine with 201811 branch. |
If there is no ipv4 or ipv6 BGP neighbors configured, the messages are a little different in different Quagga/FRR version.
Quagga in 201811
FRR in 201811
FRR in master
Currently we could not handle 2nd or 3rd cases.