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

pimd: fix crash on non-existent interface (backport #16309) #16435

Merged
merged 1 commit into from
Jul 23, 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
12 changes: 10 additions & 2 deletions pimd/pim_nb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,11 +1504,19 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_re
*/
int lib_interface_pim_address_family_create(struct nb_cb_create_args *args)
{
struct interface *ifp;

switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
case NB_EV_ABORT:
break;
case NB_EV_PREPARE:
ifp = nb_running_get_entry(args->dnode, NULL, true);
if (ifp->info)
return NB_OK;

pim_if_new(ifp, false, false, false, false);
break;
}

Expand Down
Loading