Skip to content

Commit

Permalink
Merge pull request FRRouting#16215 from FRRouting/mergify/bp/stable/9…
Browse files Browse the repository at this point in the history
….0/pr-13970

bgpd: Get 1 or 2 octets for Sub-TLV length (Tunnel Encap attr) (backport FRRouting#13970)
  • Loading branch information
donaldsharp authored Jun 14, 2024
2 parents 41bbb84 + 1b16493 commit 3853b15
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 @@ -2664,7 +2664,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 3853b15

Please sign in to comment.