mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 02:46:34 +00:00
zebra: VRF ID should be null if a nexthop group
A nexthop group should not have a VRF ID. Only individual nexthops need to be using a VRF. Fixed this both kernel and proto side. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
cb50cbc96e
commit
bbb3940ed1
@ -2298,7 +2298,7 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
||||
uint32_t id;
|
||||
unsigned char family;
|
||||
afi_t afi = AFI_UNSPEC;
|
||||
vrf_id_t vrf_id = VRF_DEFAULT;
|
||||
vrf_id_t vrf_id = 0;
|
||||
struct interface *ifp = NULL;
|
||||
struct nhmsg *nhm = NULL;
|
||||
/* struct for nexthop group abstraction */
|
||||
|
@ -2641,6 +2641,8 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
|
||||
struct nhg_connected_head nhg_depends = {0};
|
||||
/* Default to route afi */
|
||||
afi_t nhg_afi = afi;
|
||||
/* Default to route vrf id */
|
||||
vrf_id_t nhg_vrf_id = re->vrf_id;
|
||||
int ret = 0;
|
||||
|
||||
if (!re)
|
||||
@ -2680,10 +2682,11 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
|
||||
|
||||
/* change the afi for group */
|
||||
nhg_afi = AFI_UNSPEC;
|
||||
nhg_vrf_id = 0;
|
||||
}
|
||||
|
||||
// TODO: Add proto type here
|
||||
nhe = zebra_nhg_find(re->ng, re->vrf_id, nhg_afi, re->nhe_id,
|
||||
nhe = zebra_nhg_find(re->ng, nhg_vrf_id, nhg_afi, re->nhe_id,
|
||||
&nhg_depends, false);
|
||||
|
||||
if (nhe) {
|
||||
|
Loading…
Reference in New Issue
Block a user