]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix some SA issues
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Mon, 8 Aug 2016 13:37:51 +0000 (09:37 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:05 +0000 (20:26 -0500)
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>
pimd/pim_igmpv3.c
pimd/pim_mroute.c

index 149d18df54a5f2feed1e7285ea7369b682acc7a2..ba75fc221f07aeaff6740926480cc257b02a87ac 100644 (file)
@@ -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) */
index 31ca10b6b60224e2b65f195b1da9de1c3d8282f7..d87592687149b4c2949663ec6d7ea518914acaeb 100644 (file)
@@ -353,7 +353,7 @@ int pim_mroute_msg(int fd, const char *buf, int buf_size)
              fd,
              src_str,
              grp_str,
-             ifp ? ifp->name : "<ifname?>",
+             ifp->name,
              msg->im_vif);
   }