diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-04-11 12:00:51 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:39 -0400 |
| commit | bbb3940ed11d62df8263bb97ef393c1d7de0220b (patch) | |
| tree | d09786a0f3e860c34f8d3901756c31ac284cb478 /zebra/zebra_rib.c | |
| parent | cb50cbc96ee0b6c69e7c80d00c3d26070f4a1651 (diff) | |
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>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 898076b017..96e5816da3 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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) { |
