Skip to content

Commit

Permalink
bgpd: Do not check for capability length for Link-Local Next Hop capa…
Browse files Browse the repository at this point in the history
…bility

Capability's length is 0 and this is not needed to check if it's multiplied by
X or there is a minimum length for that.

Fixes: db853cc ("bgpd: Implement Link-Local Next Hop capability")

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Feb 8, 2025
1 parent 2ef76a3 commit d3741f8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion bgpd/bgp_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,6 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
case CAPABILITY_CODE_ROLE:
case CAPABILITY_CODE_SOFT_VERSION:
case CAPABILITY_CODE_PATHS_LIMIT:
case CAPABILITY_CODE_LINK_LOCAL:
/* Check length. */
if (caphdr.length < cap_minsizes[caphdr.code]) {
zlog_info(
Expand Down
1 change: 0 additions & 1 deletion bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3781,7 +3781,6 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
case CAPABILITY_CODE_ROLE:
case CAPABILITY_CODE_SOFT_VERSION:
case CAPABILITY_CODE_PATHS_LIMIT:
case CAPABILITY_CODE_LINK_LOCAL:
if (hdr->length < cap_minsizes[hdr->code]) {
zlog_info("%pBP: %s Capability length error: got %u, expected at least %u",
peer, capability, hdr->length,
Expand Down

0 comments on commit d3741f8

Please sign in to comment.