summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_attr.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2023-09-12 22:12:15 +0200
committerGitHub <noreply@github.com>2023-09-12 22:12:15 +0200
commit7e43a5bf2e1f5b9ea0f8013795bfbd0ea8a3a8e6 (patch)
treee070f0ed297e6dc187cb05e51dc9595e0c1c63ac /bgpd/bgp_attr.c
parentMerge pull request #14397 from manojvn/mgmt_sb_commands (diff)
parentbgpd: BGP_ATTR_MAX can be 255, allow using it for path attr discard/withdraw ... (diff)
downloadfrr-7e43a5bf2e1f5b9ea0f8013795bfbd0ea8a3a8e6.tar.xz
frr-7e43a5bf2e1f5b9ea0f8013795bfbd0ea8a3a8e6.zip
Merge pull request #14399 from opensourcerouting/fix/bgpd_handle_BGP_MAX_ATTR
bgpd: BGP_ATTR_MAX can be 255, allow using it for path attr
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r--bgpd/bgp_attr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 0511fe8c3..791623344 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -5151,7 +5151,7 @@ void bgp_path_attribute_discard_vty(struct vty *vty, struct peer *peer,
* then flush all.
*/
if (!discard_attrs) {
- for (i = 0; i < BGP_ATTR_MAX; i++)
+ for (i = 1; i <= BGP_ATTR_MAX; i++)
peer->discard_attrs[i] = false;
goto discard_soft_clear;
}
@@ -5160,7 +5160,7 @@ void bgp_path_attribute_discard_vty(struct vty *vty, struct peer *peer,
frrstr_split(discard_attrs, " ", &attributes, &num_attributes);
if (set)
- for (i = 0; i < BGP_ATTR_MAX; i++)
+ for (i = 1; i <= BGP_ATTR_MAX; i++)
peer->discard_attrs[i] = false;
for (i = 0; i < num_attributes; i++) {
@@ -5220,7 +5220,7 @@ void bgp_path_attribute_withdraw_vty(struct vty *vty, struct peer *peer,
* then flush all.
*/
if (!withdraw_attrs) {
- for (i = 0; i < BGP_ATTR_MAX; i++)
+ for (i = 1; i <= BGP_ATTR_MAX; i++)
peer->withdraw_attrs[i] = false;
goto withdraw_soft_clear;
}
@@ -5229,7 +5229,7 @@ void bgp_path_attribute_withdraw_vty(struct vty *vty, struct peer *peer,
frrstr_split(withdraw_attrs, " ", &attributes, &num_attributes);
if (set)
- for (i = 0; i < BGP_ATTR_MAX; i++)
+ for (i = 1; i <= BGP_ATTR_MAX; i++)
peer->withdraw_attrs[i] = false;
for (i = 0; i < num_attributes; i++) {