diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-29 09:20:42 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-24 13:51:40 -0400 |
| commit | 1e7a3a2a53d89344e358776855ae38541bbbd342 (patch) | |
| tree | 2d4a83b9fe5a23f883fb2035fc436eb833f9c5cf | |
| parent | 9c80de24342da8dd2d1db1b3f0f64f8c26084c00 (diff) | |
pimd: Fix some small crashes in pim
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | pimd/pim_ifchannel.c | 2 | ||||
| -rw-r--r-- | pimd/pim_upstream.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 7a1c3e2acd..f7d9a4e4fb 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -568,7 +568,7 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp, __PRETTY_FUNCTION__, pim_str_sg_dump(sg), ifp->name); pim_ifchannel_remove_children(ch); - if (ch) + if (ch->sources) list_delete(ch->sources); listnode_delete(pim_ifp->pim_ifchannel_list, ch); diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index e7987eb6e7..9151d9ecf3 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1362,6 +1362,13 @@ static int pim_upstream_register_stop_timer(struct thread *t) return 0; } rpg = RP(pim_ifp->pim, up->sg.grp); + if (!rpg) { + if (PIM_DEBUG_TRACE) + zlog_debug( + "%s: Cannot send register for %s no RPF to the RP", + __PRETTY_FUNCTION__, up->sg_str); + return 0; + } memset(&ip_hdr, 0, sizeof(struct ip)); ip_hdr.ip_p = PIM_IP_PROTO_PIM; ip_hdr.ip_hl = 5; |
