diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 552dd3ee1f..3faeb3d37a 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -323,6 +323,10 @@ void static_zebra_nht_register(struct static_nexthop *nh, bool reg) if (!static_zebra_nht_get_prefix(nh, &lookup.nh)) return; + + if (nh->nh_vrf_id == VRF_UNKNOWN) + return; + lookup.nh_vrf_id = nh->nh_vrf_id; lookup.safi = si->safi;