Skip to content
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

packet/bgp: Fix length calc when multiple RTM NLRIs #1754

Conversation

iwaseyusuke
Copy link
Contributor

When multiple RTM NLRIs are composed in a single MP_REACH_NLRI, the current implementation will fail to decode those NLRIs because RouteTargetMembershipNLRI.DecodeFromBytes() tests the length of the given bytes even if including the subsequent bytes.

This patch fixes to cut the bytes by using the prefix length before testing the byte length.

When multiple RTM NLRIs are composed in a single MP_REACH_NLRI, the
current implementation will fail to decode those NLRIs because
RouteTargetMembershipNLRI.DecodeFromBytes() tests the length of the
given bytes even if including the subsequent bytes.

This patch fixes to cut the bytes by using the prefix length before
testing the byte length.

Signed-off-by: IWASE Yusuke <[email protected]>
@fujita
Copy link
Member

fujita commented Jun 21, 2018

pushed, thanks.

@fujita fujita closed this Jun 21, 2018
@iwaseyusuke iwaseyusuke deleted the packet-bgp-Fix_length_calc_when_multiple_RTM_NLRIs branch June 21, 2018 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants