-
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
isisd: fix ip/ipv6 reachability tlvs #15655
Conversation
Don't allocate subtlvs container if there's nothing to add to it. If the container is allocated, the "sub-TLVs presence" bit is set in the TLVs even if there's no actual sub-TLVs, what violates the RFC. Fixes FRRouting#14514. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
@Mergifyio backport stable/9.0 stable/9.1 dev/10.0 |
❌ No backport have been created
GitHub error: |
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.
I'm disagree with this modification. In fact, if pcfgs is not null, this means that there is at least one subtlv to add. Thus, it is necessary to allocate memory for at least this subtlv. So, for me, it is not pertinent to move the subtlv memory allocation later in the loop. You could have a look to isis_lsp.c line 912 & 982 where the isis_tlvs_add_extended_ip_reach() function is called. You'll see that the pcfgs is the result of the loop around the SR algorithms.
That's exactly what I looked at.
Then it is populated in the loop, but if there are no algorithms configured it will stay full of NULL pointers, which means we won't have any |
OK. But, in this case, the modification should be done inside |
Why do you think it's better? It would just be much more code changes. |
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.
Could you amend an existing topotest to check the change? |
Regarding the topotest question, I don't have time unfortunately to look into the topotests for that. You can add you own topotest commit to this branch if you want to have it before merging this PR. |
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
I have tried to figure out how to make a topotest but it is much more complicated. Output from #14514 description is from the Arista device. No output shows the issue in FRR.
I have tested that with your fix @idryzhov and it works because TLVs are built from scratch each time the config changes.
correct |
@Mergifyio backport stable/9.0 stable/9.1 stable/10.0 |
✅ Backports have been created
|
isisd: fix ip/ipv6 reachability tlvs (backport #15655)
isisd: fix ip/ipv6 reachability tlvs (backport #15655)
isisd: fix ip/ipv6 reachability tlvs (backport #15655)
I can confirm that the fix makes IS-IS work between frr:master and Arista cEOS 4.32.0F. Great job, thank you! |
Don't allocate subtlvs container if there's nothing to add to it. If the container is allocated, the "sub-TLVs presence" bit is set in the TLVs even if there's no actual sub-TLVs, what violates the RFC.
Fixes #14514.