mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-05 17:50:04 +00:00
bgpd: Check if we have real stream data for tunnel encapsulation sub-tlvs
When the packet is malformed it can use whatever values it wants. Let's check
what the real data we have in a stream instead of relying on malformed values.
Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 9929486d6b
)
This commit is contained in:
parent
c105f9acd9
commit
c01d60b037
@ -2721,7 +2721,7 @@ 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 sublength = 0;
|
||||
struct bgp_attr_encap_subtlv *tlv;
|
||||
|
Loading…
Reference in New Issue
Block a user