]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: keep interface index on bgp nexthop tracking
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 24 Apr 2023 20:33:15 +0000 (22:33 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 27 Apr 2023 15:04:20 +0000 (17:04 +0200)
commit20d072d3ecce99a5e163c61524952797886b65a7
tree5b569bf2279abb211b412870435d36a3a1d033b3
parent34a8441fe8bb5777c9c450d2ba0dfc6bd33fd2c9
bgpd: keep interface index on bgp nexthop tracking

The following BGP configuration does not show that the
resolved next-hop to 192.0.2.1 has a defined interface.

> router bgp 65500
>  bgp router-id 192.0.2.2
>  neighbor 192.0.2.1 remote-as 65500
>  neighbor 192.0.2.1 update-source loop1
>  neighbor 192.168.0.1 remote-as 65500
>  !
>  address-family ipv4 unicast
>   network 192.0.2.2/32
>   no neighbor 192.168.0.1 activate
>  exit-address-family
>  !
>  address-family ipv4 labeled-unicast
>   neighbor 192.168.0.1 activate
>  exit-address-family
>  !
>  address-family ipv4 vpn
>   neighbor 192.0.2.1 activate
>  exit-address-family

The 'show bgp nexthop' dump does not output the interface
whereas the zebra rnh has the information.

> dut-vm# show bgp nexthop
> [..]
> Current BGP nexthop cache:
>  192.0.2.1 valid [IGP metric 0], #paths 1, peer 192.0.2.1
>   gate 192.168.0.1
>   Last update: Mon Apr 24 22:10:07 2023
>
> dut-vm# show ip nht
> 192.0.2.1
>  resolved via bgp
>  via 192.168.0.1, r2-eth0
>  Client list: bgp(fd 33)

Modify the display of BGP nexthop tracking to also dump
the interface used:

> dut-vm# show bgp nexthop
> [..]
> Current BGP nexthop cache:
>  192.0.2.1 valid [IGP metric 0], #paths 1, peer 192.0.2.1
>   gate 192.168.0.1, r2-eth0
>   Last update: Mon Apr 24 22:10:07 2023

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_nexthop.c