Skip to content

Commit

Permalink
Merge pull request #16309 from louis-6wind/fix-pim-crash
Browse files Browse the repository at this point in the history
pimd: fix crash on non-existent interface
  • Loading branch information
donaldsharp authored Jul 22, 2024
2 parents f2d5bf7 + 6952bea commit 703beba
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit 703beba

Please sign in to comment.