Skip to content

Commit

Permalink
Merge pull request #16216 from FRRouting/mergify/bp/stable/8.5/pr-13970
Browse files Browse the repository at this point in the history
bgpd: Get 1 or 2 octets for Sub-TLV length (Tunnel Encap attr) (backport #13970)
  • Loading branch information
donaldsharp authored Jun 14, 2024
2 parents 6f79347 + 8129fac commit a63f510
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bgpd/bgp_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,9 @@ static int bgp_attr_encap(struct bgp_attr_parser_args *args)

if (BGP_ATTR_ENCAP == type) {
subtype = stream_getc(BGP_INPUT(peer));
sublength = stream_getc(BGP_INPUT(peer));
sublength = (subtype < 128)
? stream_getc(BGP_INPUT(peer))
: stream_getw(BGP_INPUT(peer));
length -= 2;
#ifdef ENABLE_BGP_VNC
} else {
Expand Down

0 comments on commit a63f510

Please sign in to comment.