switch (options[0] & 0x7f)
{
case IP4_ROUTER_ALERT_OPTION:
+ /*
+ * check the option length
+ */
+ if (options[1] != 4)
+ break;
/*
* if it's an IGMP packet, pass up the local stack
*/
if (IP_PROTOCOL_IGMP == ip4->protocol)
{
+ ip_lookup_set_buffer_fib_index (
+ ip4_main.fib_index_by_sw_if_index, b);
next = IP4_OPTIONS_NEXT_LOCAL;
}
break;
ip4_options_trace_t *t =
vlib_add_trace (vm, node, b, sizeof (*t));
- clib_memcpy (t->option, options, 4);
+ clib_memcpy_fast (t->option, options, 4);
}
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, bi, next);
return s;
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_options_node) = {
.name = "ip4-options",
.vector_size = sizeof (u32),
.format_buffer = format_ip4_header,
.format_trace = format_ip4_options_trace,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON