]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: Show best path reason in JSON output for `show bgp` command
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Tue, 1 Dec 2020 20:36:05 +0000 (22:36 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Tue, 1 Dec 2020 20:36:05 +0000 (22:36 +0200)
commitbbb46eb5ae1972e79f2c9cdc585a71ad3fefc2c3
tree44f6495d53652705f459d3626dd46435542e548a
parent9171f2820445ce87ec4958e09039cdab0907c5e6
bgpd: Show best path reason in JSON output for `show bgp` command

exit1-debian-9# show ip bgp json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 2,
 "routerId": "192.168.255.1",
 "defaultLocPrf": 100,
 "localAS": 65000,
 "routes": { "172.16.255.254/32": [
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"First path received",
    "pathFrom":"external",
    "prefix":"172.16.255.254",
    "prefixLen":32,
    "network":"172.16.255.254\/32",
    "metric":0,
    "weight":0,
    "peerId":"192.168.255.2",
    "path":"65001",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.255.2",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"192.168.255.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"First path received",
    "pathFrom":"external",
    "prefix":"192.168.255.0",
    "prefixLen":24,
    "network":"192.168.255.0\/24",
    "metric":0,
    "weight":0,
    "peerId":"192.168.255.2",
    "path":"65001",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.255.2",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] }  }

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_route.c