no_fwd = header->Nbit;
if (header->type == PIM_MSG_TYPE_REGISTER) {
+ if (pim_msg_len < PIM_MSG_REGISTER_LEN) {
+ if (PIM_DEBUG_PIM_PACKETS)
+ zlog_debug("PIM Register Message size=%d shorther than min length %d",
+ pim_msg_len, PIM_MSG_REGISTER_LEN);
+ return -1;
+ }
/* First 8 byte header checksum */
checksum = in_cksum(pim_msg, PIM_MSG_REGISTER_LEN);
if (checksum != pim_checksum) {
ip->ip_id = htons(++ip_id);
ip->ip_hl = 5;
ip->ip_v = 4;
+ ip->ip_tos = IPTOS_PREC_INTERNETCONTROL;
ip->ip_p = PIM_IP_PROTO_PIM;
ip->ip_src = src;
ip->ip_dst = dst;