diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-22 19:25:48 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:10 +0100 |
commit | 905d48fa7e0a17be2de0eb08f09abb96fc818360 (patch) | |
tree | 090018fc15a6de5fd264c44d4a9ce9f7a2f7e5e4 /pimd | |
parent | pimd: Allow igmp query to go out immediately on startup (diff) | |
download | frr-905d48fa7e0a17be2de0eb08f09abb96fc818360.tar.xz frr-905d48fa7e0a17be2de0eb08f09abb96fc818360.zip |
pimd: Stop join/prunes from crashing
When we receive a join/prune for a upstream
that we are unable to create, safely ignore
the request until the situation resolves itself.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_join.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c index 7bec6c7ec..3de438917 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -108,6 +108,15 @@ static void recv_join(struct interface *ifp, struct pim_upstream *child; struct listnode *up_node; + /* + * If we are unable to create upstream information + * Due to any number of reasons it is possible + * That we might have not created the ifchannel + * and upstream above. So just fall out gracefully + */ + if (!up) + return; + for (ALL_LIST_ELEMENTS_RO (qpim_upstream_list, up_node, child)) { if (child->parent == up) @@ -178,6 +187,13 @@ static void recv_prune(struct interface *ifp, struct pim_upstream *child; struct listnode *up_node; + /* + * If up is not found then there is nothing + * to do here (see recv_join above) + */ + if (!up) + return; + for (ALL_LIST_ELEMENTS_RO (qpim_upstream_list, up_node, child)) { if (child->parent == up) |