mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 15:16:20 +00:00
bgpd: fix off-by-one in attribute flags handling
bgp_attr_flag_invalid can access beyond the last element of attr_flags_values. Fix this by initializing attr_flags_values_max to the correct value. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
b84ee83b10
commit
099111efa9
@ -1143,8 +1143,7 @@ const u_int8_t attr_flags_values [] = {
|
||||
[BGP_ATTR_AS4_PATH] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS,
|
||||
[BGP_ATTR_AS4_AGGREGATOR] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS,
|
||||
};
|
||||
static const size_t attr_flags_values_max =
|
||||
sizeof (attr_flags_values) / sizeof (attr_flags_values[0]);
|
||||
static const size_t attr_flags_values_max = array_size(attr_flags_values) - 1;
|
||||
|
||||
static int
|
||||
bgp_attr_flag_invalid (struct bgp_attr_parser_args *args)
|
||||
|
Loading…
Reference in New Issue
Block a user