]> git.puffer.fish Git - matthieu/frr.git/commit
lib: add seg6localContext json attribute in nexthop information
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 8 Aug 2024 08:05:45 +0000 (10:05 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 8 Aug 2024 09:36:01 +0000 (11:36 +0200)
commit5d027fc79194870d26d14373d5c15f2ea4d58bd5
treea616ccd29f8ca6f60d0fac293ac010987f924dbb
parentd3047146975475aaeaf81804571afdb2d08e6e20
lib: add seg6localContext json attribute in nexthop information

Some srv6 behaviors have a context attached that is visible if
no json is requested:

> # show ipv6 route
> [..]
> B>* 2001:db8:1:1:100::/128 [20/0] is directly connected, vrf10, seg6local End.DT6 table 10, weight 1, 00:00:14
> B>* 2001:db8:1:1:200::/128 [20/0] is directly connected, vrf20, seg6local End.DT6 table 20, weight 1, 00:00:14
>

The json does not dump this attribute:
> # show ipv6 route 2001:db8:1:1:100::/128 json
> [..]
>      "nexthops":[
>        {
>          "flags":3,
>          "fib":true,
>          "directlyConnected":true,
>          "interfaceIndex":6,
>          "interfaceName":"vrf10",
>          "active":true,
>          "weight":1,
>          "seg6local":{
>            "action":"End.DT6"
>          },
>        }
>

Add the json support for this.

>      "nexthops":[
>        {
>          "flags":3,
>          "fib":true,
>          "directlyConnected":true,
>          "interfaceIndex":6,
>          "interfaceName":"vrf10",
>          "active":true,
>          "weight":1,
>          "seg6local":{
>            "action":"End.DT6"
>          },
>          "seg6localContext":{
>            "table":10
>          }
>        }
>

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
lib/nexthop.c
lib/srv6.c
lib/srv6.h