diff --git a/tests/topotests/bgp_bmp/bgpbmp.py b/tests/topotests/bgp_bmp/bgpbmp.py index 41995e2b5e53..5e8b0d9be72d 100644 --- a/tests/topotests/bgp_bmp/bgpbmp.py +++ b/tests/topotests/bgp_bmp/bgpbmp.py @@ -216,11 +216,16 @@ def bmp_check_for_peer_message( ] # get the list of pairs (prefix, policy, seq) for the given message type - peers = [ - m["peer_ip"] - for m in messages - if "peer_ip" in m.keys() and m["bmp_log_type"] == bmp_log_type - ] + peers = [] + for m in messages: + if ( + "peer_ip" in m.keys() + and m["peer_ip"] != "0.0.0.0" + and m["bmp_log_type"] == bmp_log_type + ): + peers.append(m["peer_ip"]) + elif m["policy"] == "loc-rib" and m["bmp_log_type"] == bmp_log_type: + peers.append("0.0.0.0") # check for prefixes for ep in expected_peers: diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py index 61428634414c..be3e07929a0f 100644 --- a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py +++ b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py @@ -192,7 +192,7 @@ def test_peer_up(): """ tgen = get_topogen() - peers = ["192.168.0.2", "192:168::2"] + peers = ["192.168.0.2", "192:168::2", "0.0.0.0"] logger.info("checking for BMP peers up messages") diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py index b45452e7c475..e8f67515bd5d 100644 --- a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py +++ b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py @@ -200,7 +200,7 @@ def test_peer_up(): """ tgen = get_topogen() - peers = ["192.168.0.2", "192:168::2"] + peers = ["192.168.0.2", "192:168::2", "0.0.0.0"] logger.info("checking for BMP peers up messages")