summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_conditional_adv.c
diff options
context:
space:
mode:
authorMadhuri Kuruganti <k.madhuri@samsung.com>2020-10-13 22:14:27 +0200
committerMadhuri Kuruganti <k.madhuri@samsung.com>2020-10-27 11:45:36 +0100
commitfa36596cbd4206b59411036d6df8c6dcec88c4b8 (patch)
tree895e84d9501cbc9c6d2b7f932e8ea39b2b032de7 /bgpd/bgp_conditional_adv.c
parentbgpd: conditional advertisement - comments addressed and few checks (diff)
downloadfrr-fa36596cbd4206b59411036d6df8c6dcec88c4b8.tar.xz
frr-fa36596cbd4206b59411036d6df8c6dcec88c4b8.zip
bgpd: conditional advertisement - topotests
Router2# show ip bgp neighbors 10.10.20.3 json !--- Output suppressed. "addressFamilyInfo":{ "ipv4Unicast":{ "updateGroupId":2, "subGroupId":2, "packetQueueLength":0, "inboundSoftConfigPermit":true, "commAttriSentToNbr":"extendedAndStandard", "advertiseMap":{ "condition":"NON_EXIST", "conditionMap":"EXIST-MAP", "advertiseMap":"ADV-MAP", "advertiseStatus":"Withdraw" }, "acceptedPrefixCounter":0, "sentPrefixCounter":2 }, "ipv6Unicast":{ "inboundSoftConfigPermit":true, "commAttriSentToNbr":"extendedAndStandard", "advertiseMap":{ "condition":"EXIST", "conditionMap":"ALLOW_ALL", "advertiseMap":"ALLOW_ALL", "advertiseStatus":"Advertise" }, "acceptedPrefixCounter":0 } }, !--- Output suppressed. router@router:~/frr/tests/topotests/bgp_conditional_advertisement$ sudo pytest -s test_bgp_conditional_advertisement.py [sudo] password for router: mkdir: cannot create directory ‘/tmp/topotests’: File exists 2020-10-14 17:00:46,649 INFO: Running environment diagnostics =========================================================================================== test session starts ============================================================================================ platform linux2 -- Python 2.7.17, pytest-4.6.11, py-1.9.0, pluggy-0.13.1 rootdir: /home/router/frr/tests/topotests, inifile: pytest.ini collected 2 items test_bgp_conditional_advertisement.py 2020-10-14 17:00:47,137 INFO: Testsuite start time: Wed Oct 14 17:00:47 2020 2020-10-14 17:00:47,137 INFO: ======================================== 2020-10-14 17:00:47,138 INFO: Running setup_module to create topology 2020-10-14 17:00:48,711 INFO: loading topology: bgp_conditional_advertisement.test_bgp_conditional_advertisement 2020-10-14 17:00:48,712 INFO: starting topology: bgp_conditional_advertisement.test_bgp_conditional_advertisement 2020-10-14 17:00:49,042 INFO: r1: running version: 7.6-dev-MyOwnFRRVersion-gd77fe2dd0 2020-10-14 17:00:51,284 INFO: r2: running version: 7.6-dev-MyOwnFRRVersion-gd77fe2dd0 2020-10-14 17:00:53,582 INFO: r3: running version: 7.6-dev-MyOwnFRRVersion-gd77fe2dd0 2020-10-14 17:00:55,826 INFO: Running setup_module() done 2020-10-14 17:00:57,747 INFO: '_all_routes_advertised' polling started (interval 1 secs, maximum wait 130 secs) 2020-10-14 17:00:58,262 INFO: '_all_routes_advertised' succeeded after 0.52 seconds 2020-10-14 17:00:58,262 INFO: TC11: "router3" BGP convergence - PASSED!!! 2020-10-14 17:00:58,863 INFO: '_exist_map_routes_present' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:00:59,419 INFO: '_exist_map_routes_present' succeeded after 0.56 seconds 2020-10-14 17:00:59,419 INFO: TC21: exist-map routes present in "router2" BGP table - PASSED!!! 2020-10-14 17:01:00,017 INFO: '_exist_map_routes_not_present' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:02:00,192 INFO: '_exist_map_routes_not_present' succeeded after 60.18 seconds 2020-10-14 17:02:00,192 INFO: TC22: exist-map routes not present in "router2" BGP table - PASSED!!! 2020-10-14 17:02:00,736 INFO: '_non_exist_map_routes_not_present' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:02:59,215 INFO: '_non_exist_map_routes_not_present' succeeded after 58.48 seconds 2020-10-14 17:02:59,215 INFO: TC31: non-exist-map routes not present in "router2" BGP table - PASSED!!! 2020-10-14 17:02:59,968 INFO: '_non_exist_map_routes_present' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:03:59,300 INFO: '_non_exist_map_routes_present' succeeded after 59.33 seconds 2020-10-14 17:03:59,300 INFO: TC32: non-exist-map routes present in "router2" BGP table - PASSED!!! 2020-10-14 17:03:59,919 INFO: '_non_exist_map_no_condition_route_map' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:05:00,306 INFO: '_non_exist_map_no_condition_route_map' succeeded after 60.39 seconds 2020-10-14 17:05:00,306 INFO: TC41: non-exist-map route-map removed in "router2" - PASSED!!! 2020-10-14 17:05:01,024 INFO: '_exist_map_no_condition_route_map' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:05:59,405 INFO: '_exist_map_no_condition_route_map' succeeded after 58.38 seconds 2020-10-14 17:05:59,406 INFO: TC42: exist-map route-map removed in "router2" - PASSED!!! 2020-10-14 17:05:59,941 INFO: '_exist_map_routes_present_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:06:59,622 INFO: '_exist_map_routes_present_rmap_filter' succeeded after 59.68 seconds 2020-10-14 17:06:59,622 INFO: TC51: exist-map routes present with route-map filter - PASSED!!! 2020-10-14 17:07:00,150 INFO: '_exist_map_routes_present_no_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:07:00,688 INFO: '_exist_map_routes_present_no_rmap_filter' succeeded after 0.54 seconds 2020-10-14 17:07:00,688 INFO: TC52: exist-map routes present, no route-map filter - PASSED!!! 2020-10-14 17:07:01,229 INFO: '_non_exist_map_routes_present_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:07:01,767 INFO: '_non_exist_map_routes_present_rmap_filter' succeeded after 0.54 seconds 2020-10-14 17:07:01,767 INFO: TC53: non-exist-map routes present, with route-map filter - PASSED!!! 2020-10-14 17:07:02,321 INFO: '_non_exist_map_routes_present_no_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:08:00,419 INFO: '_non_exist_map_routes_present_no_rmap_filter' succeeded after 58.10 seconds 2020-10-14 17:08:00,419 INFO: TC54: non-exist-map routes present, no route-map filter - PASSED!!! 2020-10-14 17:08:01,485 INFO: '_exist_map_routes_not_present_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:08:02,039 INFO: '_exist_map_routes_not_present_rmap_filter' succeeded after 0.55 seconds 2020-10-14 17:08:02,039 INFO: TC61: exist-map routes not present, route-map filter - PASSED!!! 2020-10-14 17:08:02,568 INFO: '_exist_map_routes_not_present_no_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:08:59,147 INFO: '_exist_map_routes_not_present_no_rmap_filter' succeeded after 56.58 seconds 2020-10-14 17:08:59,147 INFO: TC62: exist-map routes not present, no route-map filter - PASSED!!! 2020-10-14 17:08:59,686 INFO: '_non_exist_map_routes_not_present_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:09:59,354 INFO: '_non_exist_map_routes_not_present_rmap_filter' succeeded after 59.67 seconds 2020-10-14 17:09:59,354 INFO: TC63: non-exist-map routes not present, route-map filter - PASSED!!! 2020-10-14 17:09:59,886 INFO: '_non_exist_map_routes_not_present_no_rmap_filter' polling started (interval 1 secs, maximum wait 90 secs) 2020-10-14 17:10:00,424 INFO: '_non_exist_map_routes_not_present_no_rmap_filter' succeeded after 0.54 seconds 2020-10-14 17:10:00,424 INFO: TC64: non-exist-map routes not present, no route-map filter - PASSED!!! .2020-10-14 17:10:01,989 INFO: assert skipped at "bgp_conditional_advertisement.test_bgp_conditional_advertisement/test_memory_leak": Memory leak test/report is disabled s2020-10-14 17:10:01,989 INFO: Running teardown_module to delete topology 2020-10-14 17:10:01,990 INFO: stopping topology: bgp_conditional_advertisement.test_bgp_conditional_advertisement 2020-10-14 17:10:01,990 INFO: stopping "s2" 2020-10-14 17:10:01,990 INFO: stopping "s1" 2020-10-14 17:10:01,993 INFO: r1: stopping bgpd 2020-10-14 17:10:01,995 INFO: r1: stopping staticd 2020-10-14 17:10:02,010 INFO: r1: stopping zebra 2020-10-14 17:10:02,013 INFO: r1: stopping bgpd 2020-10-14 17:10:02,015 INFO: r1: stopping zebra 2020-10-14 17:10:02,025 INFO: r1: waiting for daemons stopping: bgpd, zebra (0.1 seconds) 2020-10-14 17:10:02,143 INFO: r2: stopping bgpd 2020-10-14 17:10:02,147 INFO: r2: stopping staticd 2020-10-14 17:10:02,152 INFO: r2: stopping zebra 2020-10-14 17:10:02,156 INFO: r2: stopping bgpd 2020-10-14 17:10:02,164 INFO: r2: stopping zebra 2020-10-14 17:10:02,175 INFO: r2: waiting for daemons stopping: zebra (0.1 seconds) 2020-10-14 17:10:02,291 INFO: r3: stopping bgpd 2020-10-14 17:10:02,302 INFO: r3: stopping staticd 2020-10-14 17:10:02,309 INFO: r3: stopping zebra 2020-10-14 17:10:02,313 INFO: r3: stopping bgpd 2020-10-14 17:10:02,316 INFO: r3: stopping zebra 2020-10-14 17:10:02,323 INFO: r3: waiting for daemons stopping: zebra (0.1 seconds) 2020-10-14 17:10:03,615 INFO: Testsuite end time: Wed Oct 14 17:10:03 2020 2020-10-14 17:10:03,615 INFO: ======================================== ================================================================================== 1 passed, 1 skipped in 556.55 seconds =================================================================================== Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com> temp Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
Diffstat (limited to 'bgpd/bgp_conditional_adv.c')
-rw-r--r--bgpd/bgp_conditional_adv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_conditional_adv.c b/bgpd/bgp_conditional_adv.c
index 07b3b4143..521c8056f 100644
--- a/bgpd/bgp_conditional_adv.c
+++ b/bgpd/bgp_conditional_adv.c
@@ -222,11 +222,11 @@ static int bgp_conditional_adv_timer(struct thread *t)
* validation.
*/
if (filter->advmap.condition == CONDITION_EXIST)
- filter->advmap.advertise =
+ filter->advmap.update_type =
(ret == RMAP_PERMITMATCH) ? ADVERTISE
: WITHDRAW;
else
- filter->advmap.advertise =
+ filter->advmap.update_type =
(ret == RMAP_PERMITMATCH) ? WITHDRAW
: ADVERTISE;
@@ -249,7 +249,7 @@ static int bgp_conditional_adv_timer(struct thread *t)
/* Send update as per the conditional advertisement */
bgp_conditional_adv_routes(peer, afi, safi, table,
filter->advmap.amap,
- filter->advmap.advertise);
+ filter->advmap.update_type);
}
peer->advmap_table_change = false;
}