diff options
| author | Russ White <russ@riw.us> | 2021-10-19 19:16:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-19 19:16:14 -0400 |
| commit | 4dfa838afa8fee58e153d9ef8b91adc44f53da0f (patch) | |
| tree | ede967529bdbec3e5f7ef2ed73c2e587042a0405 /zebra/zebra_vty.c | |
| parent | ed131d8b748c1d0a47736c4e549e15deb180b6f9 (diff) | |
| parent | 6ba578ef294b041b6e677c78ccf464f775806688 (diff) | |
Merge pull request #9656 from chiragshah6/mdev
zebra: add resolver flag for nexthop in json
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 06528d3dbe..5b79de9697 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -776,6 +776,13 @@ static void show_nexthop_json_helper(json_object *json_nexthop, break; } + /* This nexthop is a resolver for the parent nexthop. + * Set resolver flag for better clarity and delimiter + * in flat list of nexthops in json. + */ + if (nexthop->rparent) + json_object_boolean_true_add(json_nexthop, "resolver"); + if (nexthop->vrf_id != re->vrf_id) json_object_string_add(json_nexthop, "vrf", vrf_id_to_name(nexthop->vrf_id)); |
