mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 04:26:12 +00:00
pimd: Fix some null register issues
The Null register bit was not properly being set and the total length was wrong as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
7a3ddda53f
commit
dc686f820b
@ -179,18 +179,29 @@ static void recv_prune(struct interface *ifp,
|
||||
{
|
||||
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,
|
||||
|
@ -188,7 +188,7 @@ pim_register_send (const uint8_t *buf, int buf_size, struct pim_rpf *rpg, int nu
|
||||
|
||||
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);
|
||||
|
@ -939,7 +939,7 @@ pim_upstream_register_stop_timer (struct thread *t)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user