Skip to content

Commit 93b9931

Browse files
authored
Merge pull request #19017 from fdumontet6WIND/access_list
bgpd:fix as-path replace issue with bgp as-path access-list
2 parents c612b15 + c90d949 commit 93b9931

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bgpd/bgp_aspath.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ struct aspath *aspath_replace_regex_asn(struct aspath *aspath,
12661266

12671267
while (cur_seg) {
12681268
cur_as_list = acl_list;
1269-
while (cur_as_list) {
1269+
if (cur_as_list) {
12701270
cur_as_filter = cur_as_list->head;
12711271
while (cur_as_filter) {
12721272
for (i = 0; i < cur_seg->length; i++) {
@@ -1279,7 +1279,6 @@ struct aspath *aspath_replace_regex_asn(struct aspath *aspath,
12791279
}
12801280
cur_as_filter = cur_as_filter->next;
12811281
}
1282-
cur_as_list = cur_as_list->next;
12831282
}
12841283
cur_seg = cur_seg->next;
12851284
}

tests/topotests/bgp_set_aspath_replace/test_bgp_set_aspath_replace.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def _bgp_regexp_1(router):
179179
"""
180180
conf
181181
bgp as-path access-list TER permit 3
182+
bgp as-path access-list ZTER permit 2
182183
route-map r2 permit 10
183184
set as-path replace as-path-access-list TER
184185
"""

0 commit comments

Comments
 (0)