IP fragmentation to handle buffer chains.
[vpp.git] / src / vnet / ipip / node.c
index d55b91a..60d6223 100644 (file)
@@ -108,6 +108,14 @@ ipip_input (vlib_main_t * vm, vlib_node_runtime_t * node,
          else
            {
              ip40 = vlib_buffer_get_current (b0);
+             /* Check for outer fragmentation */
+             if (ip40->flags_and_fragment_offset &
+                 clib_host_to_net_u16 (IP4_HEADER_FLAG_MORE_FRAGMENTS))
+               {
+                 next0 = IPIP_INPUT_NEXT_DROP;
+                 b0->error = node->errors[IPIP_ERROR_FRAGMENTED_PACKET];
+                 goto drop;
+               }
              vlib_buffer_advance (b0, sizeof (*ip40));
              ip_set (&src0, &ip40->src_address, true);
              ip_set (&dst0, &ip40->dst_address, true);