Skip to content

Commit 697b657

Browse files
authored
Merge pull request #17048 from FRRouting/mergify/bp/dev/10.2/pr-17042
zebra: Fix crash in pw code (backport #17042)
2 parents b8c4586 + 4353b81 commit 697b657

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zebra/zebra_pw.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ void zebra_pw_handle_dplane_results(struct zebra_dplane_ctx *ctx)
205205
vrf = zebra_vrf_lookup_by_id(dplane_ctx_get_vrf(ctx));
206206
pw = zebra_pw_find(vrf, dplane_ctx_get_ifname(ctx));
207207

208+
if (!pw)
209+
return;
210+
208211
if (dplane_ctx_get_status(ctx) != ZEBRA_DPLANE_REQUEST_SUCCESS) {
209-
if (pw)
210-
zebra_pw_install_failure(pw, dplane_ctx_get_pw_status(ctx));
212+
zebra_pw_install_failure(pw, dplane_ctx_get_pw_status(ctx));
211213
} else {
212214
if (op == DPLANE_OP_PW_INSTALL && pw->status != PW_FORWARDING)
213215
zebra_pw_update_status(pw, PW_FORWARDING);

0 commit comments

Comments
 (0)