sg.src.s_addr = INADDR_ANY;
}
-
+
pim_ifchannel_prune(ifp, upstream, &sg, source_flags, holdtime);
if (sg.src.s_addr == INADDR_ANY)
{
if (child->parent == up)
{
+ struct channel_oil *c_oil = child->channel_oil;
+ struct pim_ifchannel *ch = pim_ifchannel_find (ifp, &child->sg);
+ struct pim_interface *pim_ifp = ifp->info;
+
char buff[100];
strcpy (buff, pim_str_sg_dump (&up->sg));
zlog_debug("%s %s: Prune(S,G)=%s from %s",
__FILE__, __PRETTY_FUNCTION__,
- buff, pim_str_sg_dump (&sg));
+ buff, pim_str_sg_dump (&child->sg));
if (!pim_upstream_evaluate_join_desired (child))
- pim_channel_del_oif (child->channel_oil, ifp, PIM_OIF_FLAG_PROTO_PIM);
+ pim_channel_del_oif (c_oil, ifp, PIM_OIF_FLAG_PROTO_PIM);
+
+ /*
+ * If the S,G has no if channel and the c_oil still
+ * has output here then the *,G was supplying the implied
+ * if channel. So remove it.
+ */
+ if (!ch && c_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index])
+ pim_channel_del_oif (c_oil, ifp, PIM_OIF_FLAG_PROTO_PIM);
}
}
}
-
}
int pim_joinprune_recv(struct interface *ifp,
memset(buffer, 0, 3000);
b1 = buffer + PIM_MSG_HEADER_LEN;
- *b1 |= null_register << 31;
+ *b1 |= null_register << 6;
b1 = buffer + PIM_MSG_REGISTER_LEN;
memcpy(b1, (const unsigned char *)buf, buf_size);
ip_hdr.ip_v = 4;
ip_hdr.ip_src = up->sg.src;
ip_hdr.ip_dst = up->sg.grp;
- ip_hdr.ip_len = 20;
+ ip_hdr.ip_len = htons (20);
// checksum is broken
pim_register_send ((uint8_t *)&ip_hdr, sizeof (struct ip), rpg, 1);
pim_channel_add_oif (up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_PIM);