]> git.puffer.fish Git - mirror/frr.git/commit
zebra: add resolver for nexthop in json 9656/head
authorChirag Shah <chirag@nvidia.com>
Tue, 21 Sep 2021 22:03:58 +0000 (15:03 -0700)
committerChirag Shah <chirag@nvidia.com>
Mon, 27 Sep 2021 23:05:08 +0000 (16:05 -0700)
commit6ba578ef294b041b6e677c78ccf464f775806688
tree63b7f3910d3ded891df6a381e6bbb53ed72fea5a
parent01236d7aa7dab0891fa25012f87bc1fe3bbcfe9b
zebra: add resolver for nexthop in json

zebra rib 'show ip route json' lists all nexthops in a flat list.
To identify the recursively resolved
nexthops relation adding a flag "resolver" as delimiter
to identify recursively resolved nexthop in the list.

Testing Done:
{
  "1.1.1.0\/24":[
    {
      "prefix":"1.1.1.0\/24",
      "protocol":"static",
       ....
      "nexthops":[
        {
          "flags":5,
          "ip":"27.0.0.14",
          "afi":"ipv4",
          "active":true,
          "recursive":true,
          "weight":1
        },
        {
          "flags":3,
          "fib":true,
          "ip":"fe80::202:ff:fe00:11",
          "afi":"ipv6",
          "interfaceIndex":12,
          "interfaceName":"uplink-1",
          "resolver":true,  <-- Resolver for recursive true flag nh
          "active":true,
          "weight":1
        },
      ]
    }
  ]
}

Signed-off-by: Chirag Shah <chirag@nvidia.com>
zebra/zebra_vty.c