summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_northbound.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-13 01:49:11 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2019-08-07 02:26:23 +0200
commitdaa64bdf49bef8911f9b3b28028ac2f60dac7169 (patch)
treec48803fc28db5f29f163ee20ade17e2d9e671a94 /eigrpd/eigrp_northbound.c
parenteigrpd: Add vrf_id to `struct eigrp` (diff)
downloadfrr-daa64bdf49bef8911f9b3b28028ac2f60dac7169.tar.xz
frr-daa64bdf49bef8911f9b3b28028ac2f60dac7169.zip
eigrpd: Use the eigrp->vrf_id where we can immediately transform
For those places where we can immediately transform the usage of VRF_DEFAULT to eigrp->vrf_id do so. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_northbound.c')
-rw-r--r--eigrpd/eigrp_northbound.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/eigrpd/eigrp_northbound.c b/eigrpd/eigrp_northbound.c
index 3e50d018b..5eecc3332 100644
--- a/eigrpd/eigrp_northbound.c
+++ b/eigrpd/eigrp_northbound.c
@@ -746,14 +746,17 @@ static int eigrpd_instance_redistribute_create(enum nb_event event,
union nb_resource *resource)
{
struct eigrp_metrics metrics;
+ const char *vrfname;
struct eigrp *eigrp;
uint32_t proto;
+ vrf_id_t vrfid;
switch (event) {
case NB_EV_VALIDATE:
proto = yang_dnode_get_enum(dnode, "./protocol");
- if (vrf_bitmap_check(zclient->redist[AFI_IP][proto],
- VRF_DEFAULT))
+ vrfname = yang_dnode_get_string(dnode, "../vrf");
+ vrfid = vrf_name_to_id(vrfname);
+ if (vrf_bitmap_check(zclient->redist[AFI_IP][proto], vrfid))
return NB_ERR_INCONSISTENCY;
break;
case NB_EV_PREPARE: