diff options
author | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-08-08 15:37:51 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:05 +0100 |
commit | 0bc327f7b45dbb5bbc21ebdf4e546de2761821cb (patch) | |
tree | a9ae9e084bb2290f1a55a66fe515488f54c27aa1 /pimd/pim_igmpv3.c | |
parent | pimd: Some SA analysis fixes. (diff) | |
download | frr-0bc327f7b45dbb5bbc21ebdf4e546de2761821cb.tar.xz frr-0bc327f7b45dbb5bbc21ebdf4e546de2761821cb.zip |
pimd: Fix some SA issues
SA found these two issues:
1) Check of ifp non-null caused other non-checks down code
to assume ifp could be null. This is not the case.
If we get a callback at this point we must have a valid ifp pointer.
2) We were inadvertently calling igmp_source_reset_gmi with
a possible NULL source pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_igmpv3.c')
-rw-r--r-- | pimd/pim_igmpv3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index 149d18df5..ba75fc221 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -647,8 +647,10 @@ static void isex_excl(struct igmp_group *group, struct in_addr star = { .s_addr = INADDR_ANY }; source = igmp_find_source_by_addr (group, star); if (source) - IGMP_SOURCE_DONT_DELETE(source->source_flags); - igmp_source_reset_gmi (group->group_igmp_sock, group, source); + { + IGMP_SOURCE_DONT_DELETE(source->source_flags); + igmp_source_reset_gmi (group->group_igmp_sock, group, source); + } } /* E.5: delete all sources marked with deletion flag: (X-A) and (Y-A) */ |