summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-08 15:12:12 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-09 01:35:53 +0100
commit4a7371e9e21569eee0e728f64ea06870d1aafa5e (patch)
tree15d90068bac9ca5259e6e63b5df7cac7747df08f /bgpd
parentMerge pull request #1722 from donaldsharp/vrf_mc_vrf (diff)
downloadfrr-4a7371e9e21569eee0e728f64ea06870d1aafa5e.tar.xz
frr-4a7371e9e21569eee0e728f64ea06870d1aafa5e.zip
*: Track vrfs per nexthop not per route entry
Track the vfrs on a per nexthop basis instead of on a per route entry basis. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_zebra.c4
-rw-r--r--bgpd/rfapi/vnc_zebra.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index e0bd74a20..acc66d046 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1001,7 +1001,6 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
memset(&api, 0, sizeof(api));
memcpy(&api.rmac, &(info->attr->rmac), sizeof(struct ethaddr));
api.vrf_id = bgp->vrf_id;
- api.nh_vrf_id = bgp->vrf_id;
api.type = ZEBRA_ROUTE_BGP;
api.safi = safi;
api.prefix = *p;
@@ -1081,7 +1080,7 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
api_nh = &api.nexthops[valid_nh_count];
api_nh->gate.ipv4 = *nexthop;
-
+ api_nh->vrf_id = bgp->vrf_id;
/* EVPN type-2 routes are
programmed as onlink on l3-vni SVI
*/
@@ -1255,7 +1254,6 @@ void bgp_zebra_withdraw(struct prefix *p, struct bgp_info *info, safi_t safi)
memset(&api, 0, sizeof(api));
memcpy(&api.rmac, &(info->attr->rmac), sizeof(struct ethaddr));
api.vrf_id = peer->bgp->vrf_id;
- api.nh_vrf_id = peer->bgp->vrf_id;
api.type = ZEBRA_ROUTE_BGP;
api.safi = safi;
api.prefix = *p;
diff --git a/bgpd/rfapi/vnc_zebra.c b/bgpd/rfapi/vnc_zebra.c
index 92d7e6fc7..6afcd21a1 100644
--- a/bgpd/rfapi/vnc_zebra.c
+++ b/bgpd/rfapi/vnc_zebra.c
@@ -396,7 +396,6 @@ static void vnc_zebra_route_msg(struct prefix *p, unsigned int nhp_count,
memset(&api, 0, sizeof(api));
api.vrf_id = VRF_DEFAULT;
- api.nh_vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_VNC;
api.safi = SAFI_UNICAST;
api.prefix = *p;
@@ -407,6 +406,7 @@ static void vnc_zebra_route_msg(struct prefix *p, unsigned int nhp_count,
for (i = 0; i < api.nexthop_num; i++) {
api_nh = &api.nexthops[i];
+ api_nh->vrf_id = VRF_DEFAULT;
switch (p->family) {
case AF_INET:
memcpy(&api_nh->gate.ipv4, nhp_ary4[i],