VPP-100: Fix IP4 local handling of TCP/IP fragmented packet
Fix previous change that does not work on little endian machines. Use inline call ip4_is_fragment() which is endian neutral. Change-Id: I5a35d89d936650ab6c628dfc388b8c992a74a589 Signed-off-by: John Lo <loj@cisco.com>
This commit is contained in:
@ -1775,8 +1775,8 @@ ip4_local (vlib_main_t * vm,
|
||||
|
||||
/* 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;
|
||||
proto0 = ip4_is_fragment(ip0) ? 0xfe : ip0->protocol;
|
||||
proto1 = ip4_is_fragment(ip1) ? 0xfe : ip1->protocol;
|
||||
is_udp0 = proto0 == IP_PROTOCOL_UDP;
|
||||
is_udp1 = proto1 == IP_PROTOCOL_UDP;
|
||||
is_tcp_udp0 = is_udp0 || proto0 == IP_PROTOCOL_TCP;
|
||||
@ -1970,7 +1970,7 @@ ip4_local (vlib_main_t * vm,
|
||||
|
||||
/* 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;
|
||||
proto0 = ip4_is_fragment(ip0) ? 0xfe : ip0->protocol;
|
||||
is_udp0 = proto0 == IP_PROTOCOL_UDP;
|
||||
is_tcp_udp0 = is_udp0 || proto0 == IP_PROTOCOL_TCP;
|
||||
|
||||
|
Reference in New Issue
Block a user