From: John Lo Date: Thu, 2 Jun 2016 13:28:37 +0000 (-0400) Subject: VPP-100: Fix IPv4 local handling of IP fragmented packets X-Git-Tag: v16.06-rc2~4 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=142db43bb617a9905ffa898e0e5c547d156bb773;p=vpp.git VPP-100: Fix IPv4 local handling of IP fragmented packets Before VPP is enhenced to do IP reassembly of local packets, just set the protocol path to "experimental" for now so they will be error-punted as unknow IP protocol. Change-Id: I2ffefb0b4205357653ba24d80c722cafd5972fba Signed-off-by: John Lo --- diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c index a84b83bc225..353cb76eb8f 100644 --- a/vnet/vnet/ip/ip4_forward.c +++ b/vnet/vnet/ip/ip4_forward.c @@ -1773,8 +1773,10 @@ ip4_local (vlib_main_t * vm, leaf0 = ip4_fib_mtrie_lookup_step (mtrie0, leaf0, &ip0->src_address, 0); leaf1 = ip4_fib_mtrie_lookup_step (mtrie1, leaf1, &ip1->src_address, 0); - proto0 = ip0->protocol; - proto1 = ip1->protocol; + /* Treat IP frag packets as "experimental" protocol for now + until support of IP frag reassembly is implemented */ + proto0 = (ip0->flags_and_fragment_offset << 2) ? 0xfe : ip0->protocol; + proto1 = (ip1->flags_and_fragment_offset << 2) ? 0xfe : ip1->protocol; is_udp0 = proto0 == IP_PROTOCOL_UDP; is_udp1 = proto1 == IP_PROTOCOL_UDP; is_tcp_udp0 = is_udp0 || proto0 == IP_PROTOCOL_TCP; @@ -1966,7 +1968,9 @@ ip4_local (vlib_main_t * vm, leaf0 = ip4_fib_mtrie_lookup_step (mtrie0, leaf0, &ip0->src_address, 0); - proto0 = ip0->protocol; + /* Treat IP frag packets as "experimental" protocol for now + until support of IP frag reassembly is implemented */ + proto0 = (ip0->flags_and_fragment_offset << 2) ? 0xfe : ip0->protocol; is_udp0 = proto0 == IP_PROTOCOL_UDP; is_tcp_udp0 = is_udp0 || proto0 == IP_PROTOCOL_TCP;