diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-02-26 09:00:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-26 09:00:59 +0100 |
| commit | 1016090a8a5df21ccc11b489d00933fcbc7267b6 (patch) | |
| tree | efdd3ff9611d0d0b35afd501f7a66b8302c9352f | |
| parent | 77b52da131293041c5074a3f9944a1709872e2f4 (diff) | |
| parent | da0f552f5d46a2db365565de582252ee3d620038 (diff) | |
Merge pull request #18235 from donaldsharp/static_registering_unknown_vrf
staticd: Fix crash because registering unknown vrf
| -rw-r--r-- | staticd/static_zebra.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |
