]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_nht.c
bgpd: fix the IGP metric for best path selection on VPN import
authorLouis Scalbert <louis.scalbert@6wind.com>
Mon, 14 Feb 2022 13:18:10 +0000 (14:18 +0100)
committerLouis Scalbert <louis.scalbert@6wind.com>
Thu, 15 Dec 2022 16:09:35 +0000 (17:09 +0100)
commitac2f64d3ec2fe63d3d1ba13f5c297cd70aed4364
tree03dd6134f459f8b1d110d5f15d5861b432396e66
parentdaa256700250ec0b4693f8820c7188123c2e0752
bgpd: fix the IGP metric for best path selection on VPN import

Since the commit da0c0ef70c ("bgpd: VRF-Lite fix best path selection"),
the best path selection is made from the comparison of the attributes
of the original route i.e. the ultimate path.

The IGP metric is currently set on the child path instead of the
ultimate path (i.e. the parent path). On eBGP, the ultimate path is the
child path. However, for imported routes, the ultimate path is always
set to 0, which results in skipping the IGP metric comparison when
selecting the best path.

Set the IGP metric on the ultimate path when a BGP nexthop is added or
updated.

Fixes: da0c0ef70c ("bgpd: VRF-Lite fix best path selection")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgp_nht.c