Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: Fix crash in pw code (backport #17042) #17048

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions zebra/zebra_pw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading