#include <vnet/adj/adj_midchain.h>
#include <vnet/adj/adj_nbr.h>
#include <vnet/mpls/mpls.h>
+#include <vnet/l2/l2_input.h>
static const char *gre_tunnel_type_names[] = GRE_TUNNEL_TYPE_NAMES;
adj = adj_get (ai);
sw_if_index = adj->rewrite_header.sw_if_index;
- if ((vec_len (gm->tunnel_index_by_sw_if_index) < sw_if_index) ||
+ if ((vec_len (gm->tunnel_index_by_sw_if_index) <= sw_if_index) ||
(~0 == gm->tunnel_index_by_sw_if_index[sw_if_index]))
return;
else
{
/* Default MAC address (d00b:eed0:0000 + sw_if_index) */
- u8 address[6] = { 0xd0, 0x0b, 0xee, 0xd0, (u8) t_idx >> 8, (u8) t_idx };
- error = ethernet_register_interface (vnm, gre_device_class.index, t_idx,
- address, &hw_if_index, 0);
+ u8 address[6] =
+ { 0xd0, 0x0b, 0xee, 0xd0, (u8) (t_idx >> 8), (u8) t_idx };
+ error =
+ ethernet_register_interface (vnm, gre_device_class.index, t_idx,
+ address, &hw_if_index, 0);
if (error)
{
clib_error_report (error);
64 + sizeof (gre_header_t) + sizeof (ip6_header_t);
}
- hi->per_packet_overhead_bytes =
- /* preamble */ 8 + /* inter frame gap */ 12;
-
/* Standard default gre MTU. */
- hi->max_l3_packet_bytes[VLIB_RX] = hi->max_l3_packet_bytes[VLIB_TX] = 9000;
+ vnet_sw_interface_set_mtu (vnm, sw_if_index, 9000);
/*
* source the FIB entry for the tunnel's destination