Skip to content

tests: Add a v6 pmsi tunnel only test.

f864838
Select commit
Loading
Failed to load commit list.
Merged

bgpd: PMSI tunnel attribute compatibility #21507

tests: Add a v6 pmsi tunnel only test.
f864838
Select commit
Loading
Failed to load commit list.
frrbot / frrbot completed Apr 14, 2026 in 21s

Style and/or linter errors found

Style and/or linter errors found

Details

Thanks for your contribution to FRR!

Click for style suggestions

diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
index d5fa02009f..8d2c50dd73 100644
--- a/bgpd/bgp_attr.h
+++ b/bgpd/bgp_attr.h
@@ -110,8 +110,8 @@ enum pta_type {
 
 /* PMSI lengths for label-only, ipv4, and ipv6 "identifier" */
 #define BGP_ATTR_PMSI_TUNNEL_LBL_ONLY_LEN 5
-#define BGP_ATTR_PMSI_TUNNEL_V4_LENGTH    9
-#define BGP_ATTR_PMSI_TUNNEL_V6_LENGTH    21
+#define BGP_ATTR_PMSI_TUNNEL_V4_LENGTH	  9
+#define BGP_ATTR_PMSI_TUNNEL_V6_LENGTH	  21
 
 /*
  * Prefix-SID type-4
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index a6d7d53455..5e1c2bce0f 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -13330,9 +13330,9 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
 
 			if (bgp_attr_get_pmsi_tnl_type(attr) == PMSI_TNLTYPE_INGR_REPL) {
 				if (IS_MAPPED_IPV6(&attr->tunn_id)) {
-					json_object_string_addf(
-						json_pmsi, "id", "%pI4",
-						(in_addr_t *)&attr->tunn_id.s6_addr32[3]);
+					json_object_string_addf(json_pmsi, "id", "%pI4",
+								(in_addr_t *)&attr->tunn_id
+									.s6_addr32[3]);
 				} else {
 					json_object_string_addf(json_pmsi, "id", "%pI6",
 								&attr->tunn_id);
diff --git a/tests/topotests/lib/evpn.py b/tests/topotests/lib/evpn.py
index f42fbdc2c0..e52a4af1aa 100644
--- a/tests/topotests/lib/evpn.py
+++ b/tests/topotests/lib/evpn.py
@@ -1126,10 +1126,8 @@ def evpn_verify_no_remote_vtep_in_l3vni(router, l3vni_list):
             except ValueError:
                 continue
         if found_vtep_ips:
-            return (
-                "VNI {}: expected no remote VTEPs, found {}".format(
-                    vni, sorted(found_vtep_ips)
-                )
+            return "VNI {}: expected no remote VTEPs, found {}".format(
+                vni, sorted(found_vtep_ips)
             )
     return None
 

To apply the style suggestions:

curl https://gist.githubusercontent.com/polychaeta/3ada7c8c68fa5dd6ebe455b684350833/raw/816f3706528311ef095f85fb10484201e40290d6/style.diff | git apply -

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.