return (NULL);
ip4 = vlib_buffer_get_current (b);
- memset (ip4, 0, sizeof (ip4_header_t));
+ clib_memset (ip4, 0, sizeof (ip4_header_t));
ip4->ip_version_and_header_length = 0x46;
ip4->ttl = 1;
ip4->protocol = IP_PROTOCOL_IGMP;
break;
case IGMP_MSG_QUERY:
if (group != NULL)
- clib_memcpy (&ip4->dst_address, &group->key->ip4,
- sizeof (ip4_address_t));
+ clib_memcpy_fast (&ip4->dst_address, &group->key->ip4,
+ sizeof (ip4_address_t));
else
ip4->dst_address.as_u32 = IGMP_GENERAL_QUERY_ADDRESS;
break;
}
- /* add the router alert optnios */
+ /* add the router alert options */
option = vlib_buffer_get_current (b);
option[0] = 0x80 | 20; // IP4_ROUTER_ALERT_OPTION;
option[1] = 4; // length
vm = vlib_get_main ();
config = igmp_config_lookup (bk->sw_if_index);
+
+ if (NULL == config)
+ return;
+
f = vlib_get_frame_to_node (vm, ip4_rewrite_mcast_node.index);
to_next = vlib_frame_vector_args (f);
void
igmp_pkt_build_report_init (igmp_pkt_build_report_t * br, u32 sw_if_index)
{
- memset (br, 0, sizeof (*br));
+ clib_memset (br, 0, sizeof (*br));
br->base.sw_if_index = sw_if_index;
}
void
igmp_pkt_build_query_init (igmp_pkt_build_query_t * bq, u32 sw_if_index)
{
- memset (bq, 0, sizeof (*bq));
+ clib_memset (bq, 0, sizeof (*bq));
bq->base.sw_if_index = sw_if_index;
}