aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Saluja <rajsaluj@cisco.com>2018-07-26 14:13:09 -0700
committerNeale Ranns <nranns@cisco.com>2018-07-30 11:24:54 +0000
commit17ee6f08d4bcae53efeeba97305f21aadda8f8b0 (patch)
treebe7f61e82bef7dcd90ce5ecd72a8733128de35d1
parent3c723f38129b83042dc47f7e04d0e4c3e7870885 (diff)
Reverse the logic of flagging malformed packet in fragmentation code to allow padding
Change-Id: I051c137ae18fd436a798a12a56a9d12f8eaa2e08 Signed-off-by: Rajesh Saluja <rajsaluj@cisco.com> (cherry picked from commit 1f895c9a40f446ca9f1b7803f350c70ebb3ad0fa)
-rw-r--r--src/vnet/ip/ip_frag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c
index 9f9373857b9..8d495af63ed 100644
--- a/src/vnet/ip/ip_frag.c
+++ b/src/vnet/ip/ip_frag.c
@@ -66,7 +66,7 @@ ip4_frag_do_fragment (vlib_main_t * vm, u32 pi, u32 ** buffer,
ptr = 0;
max = (mtu - sizeof (*ip4) - vnet_buffer (p)->ip_frag.header_offset) & ~0x7;
- if (rem < (p->current_length - offset - sizeof (*ip4)))
+ if (rem > (p->current_length - offset - sizeof (*ip4)))
{
*error = IP_FRAG_ERROR_MALFORMED;
return;