diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-10-09 13:46:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-09 13:46:25 -0500 |
| commit | f9f11c675fb50cb3ff7c1140a5461e829b00cae9 (patch) | |
| tree | 20f447afdfbf1e8314fd18675f82ed43cb5c46c5 | |
| parent | 47cdfbda7640f9e10dc298cb98ea0411dc14e0ab (diff) | |
| parent | 154a89bc31ab676bf8d037a37a98587ca0236ba9 (diff) | |
Merge pull request #17042 from donaldsharp/zebra_pw_crash
zebra: Fix crash in pw code
| -rw-r--r-- | zebra/zebra_pw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c index c8ffaf0bbe..6adc0b1b4a 100644 --- a/zebra/zebra_pw.c +++ b/zebra/zebra_pw.c @@ -205,9 +205,11 @@ void zebra_pw_handle_dplane_results(struct zebra_dplane_ctx *ctx) vrf = zebra_vrf_lookup_by_id(dplane_ctx_get_vrf(ctx)); pw = zebra_pw_find(vrf, dplane_ctx_get_ifname(ctx)); + if (!pw) + return; + if (dplane_ctx_get_status(ctx) != ZEBRA_DPLANE_REQUEST_SUCCESS) { - if (pw) - zebra_pw_install_failure(pw, dplane_ctx_get_pw_status(ctx)); + zebra_pw_install_failure(pw, dplane_ctx_get_pw_status(ctx)); } else { if (op == DPLANE_OP_PW_INSTALL && pw->status != PW_FORWARDING) zebra_pw_update_status(pw, PW_FORWARDING); |
