]> git.puffer.fish Git - mirror/frr.git/commit
lib: add support for next-csid instruction display in nexthops
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 24 Apr 2025 13:55:45 +0000 (15:55 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 1 May 2025 07:15:53 +0000 (09:15 +0200)
commit4f263d2208c2c378e618b2d0a7d88d15d66e1784
tree667b4579e20385b44bd26c51fe3ea639d54568bf
parenta078e2e52e98da9362fc7fa267a7e8933139f8f8
lib: add support for next-csid instruction display in nexthops

The next-csid term is only used by IETF; instead, the industry is using
the uSID terminology defined in the linked document. Instead of
displaying the next-csid instruction with the other flavors, replace the
non microsid behavior with the associated microsid behavior. Example:
- End becomes uN
- End.X becomes uA
- End.DT4 becomes uT4
- ...

> # ip -6 route add 2008::1 encap seg6local action End flavors next-csid,psp dev dum1
> # show ipv6 route
> [..]
> K>* 2008::1/128 [0/1024] is directly connected, dum1, seg6local uN (PSP), weight 1, 00:00:05
> [..]
> # show ipv6 route json
> [..]
> ,"2008::1/128":[{"prefix":"2008::1/128","prefixLen":128,"protocol":"kernel","vrfId":0,
> "vrfName":"default","selected":true,"destSelected":true,"distance":0,"metric":1024,"installed":true,
> "table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":1,"internalNextHopActiveNum":1,
> "nexthopGroupId":30,"installedNexthopGroupId":30,"uptime":"00:01:12","nexthops":[{"flags":3,"fib":true,
> "directlyConnected":true,"interfaceIndex":19,"interfaceName":"dum1","active":true,"weight":1,
> "seg6local":{"action":"uN","sidStructure":{"blockLen":0,"nodeLen":0,"funcLen":0,"argLen":0}},
> "seg6localContext":{"flavors":["psp"]}}]}]
> [..]

Link: https://datatracker.ietf.org/doc/html/draft-filsfils-spring-net-pgm-extension-srv6-usid
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
lib/nexthop.c
lib/srv6.c
lib/srv6.h