summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index aceb990534..0ff9d75781 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -7857,9 +7857,11 @@ void bgp_master_init(struct thread_master *master)
*/
static void bgp_if_finish(struct bgp *bgp)
{
- struct vrf *vrf = vrf_lookup_by_id(bgp->vrf_id);
+ struct vrf *vrf;
struct interface *ifp;
+ vrf = bgp_vrf_lookup_by_instance_type(bgp);
+
if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW || !vrf)
return;