summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/ip/ip4_forward.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c
index 5c2ac3828a1..e9e5232f9e0 100644
--- a/vnet/vnet/ip/ip4_forward.c
+++ b/vnet/vnet/ip/ip4_forward.c
@@ -1785,8 +1785,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;
@@ -1980,7 +1980,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;