]> git.puffer.fish Git - mirror/frr.git/commitdiff
staticd: Extend `ip_route_vrf` CLI to support SRv6 traffic steering
authorCarmine Scarpitta <cscarpit@cisco.com>
Tue, 24 Dec 2024 07:59:18 +0000 (08:59 +0100)
committerCarmine Scarpitta <cscarpit@cisco.com>
Mon, 3 Feb 2025 21:20:58 +0000 (22:20 +0100)
staticd already has a CLI to steer IPv6 traffic over a given SRv6 SID
list:

```
vrf vrf10
 ipv6 route 2001:db8:1:1::/64 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

This PR extends the existing CLI `ip route` to support steering of IPv4
traffic over an SRv6 SID list.

```
vrf vrf10
 ip route 10.0.0.0/24 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
staticd/static_vty.c

index b84e3b6a6cb9f03efb9904926d5e8c01d223bc66..7c425f4a33df824e3ce09267b359f63be54abba9 100644 (file)
@@ -771,6 +771,7 @@ DEFPY_YANG(ip_route_vrf,
          |nexthop-vrf NAME                            \
          |color (1-4294967295)                        \
          |bfd$bfd [{multi-hop$bfd_multi_hop|source A.B.C.D$bfd_source|profile BFDPROF$bfd_profile}] \
+         |segments WORD \
           }]",
       NO_STR IP_STR
       "Establish static routes\n"
@@ -794,7 +795,9 @@ DEFPY_YANG(ip_route_vrf,
       BFD_INTEGRATION_SOURCE_STR
       BFD_INTEGRATION_SOURCEV4_STR
       BFD_PROFILE_STR
-      BFD_PROFILE_NAME_STR)
+      BFD_PROFILE_NAME_STR
+      "Steer this route over an SRv6 SID list\n"
+      "SRv6 SID list\n")
 {
        struct static_route_args args = {
                .delete = !!no,
@@ -815,6 +818,7 @@ DEFPY_YANG(ip_route_vrf,
                .bfd_multi_hop = !!bfd_multi_hop,
                .bfd_source = bfd_source_str,
                .bfd_profile = bfd_profile,
+               .segs = segments,
        };
 
        return static_route_nb_run(vty, &args);