Commit 379197e958 for frr

commit 379197e958744f69007ed47f1c2c2457e805e10f
Author: Philippe Guibert <philippe.guibert@6wind.com>
Date:   Mon Oct 12 14:17:40 2026 +0200

    topotests: check aigp metric 0 in bgp_aigp

    No test checks that a route-map with "set aigp-metric 0" advertises the
    AIGP attribute with a metric of 0.

    The AIGP attribute used to be removed when its metric was 0.

    Fix this by changing the AIGP metric that r7 sets for 10.0.0.72/32 to
    0, and by checking that r6 receives the AIGP attribute with that metric.

    Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>

diff --git a/tests/topotests/bgp_aigp/test_bgp_aigp.py b/tests/topotests/bgp_aigp/test_bgp_aigp.py
index f714d12c45..2248d2de4b 100644
--- a/tests/topotests/bgp_aigp/test_bgp_aigp.py
+++ b/tests/topotests/bgp_aigp/test_bgp_aigp.py
@@ -26,6 +26,9 @@ without "neighbor PEER aigp".
 peer1 and peer2 are eBGP peers of r7, and both advertise a prefix with
 the AIGP attribute. r7 accepts it from peer1 ("neighbor PEER aigp"),
 and ignores it from peer2.
+
+r7 sets aigp-metric 0 for 10.0.0.72/32, and r6 receives the AIGP
+attribute with a metric of 0.
 """

 import os
@@ -348,6 +351,27 @@ def test_bgp_aigp_ebgp_peer():
     assert result is True, result


+def test_bgp_aigp_metric_zero():
+    tgen = get_topogen()
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    r6 = tgen.gears["r6"]
+    r7 = tgen.gears["r7"]
+
+    r7.vtysh_cmd(
+        """
+    configure terminal
+        route-map rmap permit 20
+            set aigp-metric 0
+    """
+    )
+
+    result = check_aigp_metric(r6, "10.0.0.72/32", 0)
+    assert result is True, result
+
+
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))