mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-06 22:22:46 +00:00
Merge pull request #16293 from FRRouting/mergify/bp/stable/9.1/pr-16214
bgpd: A couple more fixes for Tunnel encapsulation handling (backport #16214)
This commit is contained in:
commit
dca6ed0d2c
@ -2700,17 +2700,20 @@ static int bgp_attr_encap(struct bgp_attr_parser_args *args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (length >= 4) {
|
while (STREAM_READABLE(BGP_INPUT(peer)) >= 4) {
|
||||||
uint16_t subtype = 0;
|
uint16_t subtype = 0;
|
||||||
uint16_t sublength = 0;
|
uint16_t sublength = 0;
|
||||||
struct bgp_attr_encap_subtlv *tlv;
|
struct bgp_attr_encap_subtlv *tlv;
|
||||||
|
|
||||||
if (BGP_ATTR_ENCAP == type) {
|
if (BGP_ATTR_ENCAP == type) {
|
||||||
subtype = stream_getc(BGP_INPUT(peer));
|
subtype = stream_getc(BGP_INPUT(peer));
|
||||||
sublength = (subtype < 128)
|
if (subtype < 128) {
|
||||||
? stream_getc(BGP_INPUT(peer))
|
sublength = stream_getc(BGP_INPUT(peer));
|
||||||
: stream_getw(BGP_INPUT(peer));
|
|
||||||
length -= 2;
|
length -= 2;
|
||||||
|
} else {
|
||||||
|
sublength = stream_getw(BGP_INPUT(peer));
|
||||||
|
length -= 3;
|
||||||
|
}
|
||||||
#ifdef ENABLE_BGP_VNC
|
#ifdef ENABLE_BGP_VNC
|
||||||
} else {
|
} else {
|
||||||
subtype = stream_getw(BGP_INPUT(peer));
|
subtype = stream_getw(BGP_INPUT(peer));
|
||||||
|
Loading…
Reference in New Issue
Block a user