From e1e31e086983ac9d18fa973172697436b9368495 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 24 Dec 2024 08:57:28 +0100 Subject: [PATCH] staticd: Extend `ip_route_address_interface_vrf` to support SRv6 traffic steering 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 --- staticd/static_vty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/staticd/static_vty.c b/staticd/static_vty.c index ce414121dc..cabcf00b03 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -635,6 +635,7 @@ DEFPY_YANG(ip_route_address_interface_vrf, |onlink$onlink \ |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" @@ -659,7 +660,9 @@ DEFPY_YANG(ip_route_address_interface_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, @@ -681,6 +684,7 @@ DEFPY_YANG(ip_route_address_interface_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); -- 2.39.5