aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChun Li <chunl2@cisco.com>2018-02-07 09:58:28 +0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-08 07:53:41 +0000
commit91fa7d3387ee707c50a875623d4a74a358da1970 (patch)
tree1b54459bd714f122a3eb4ded08e401573b6b5258
parent4298ab41db0488f4721af4e7d13628e4d17109b9 (diff)
ip4_forward: set pkt error in case potential memory corrupt
Change-Id: Ib9eb65d2ba166f5883a8ce8d37298c696113f2be Signed-off-by: Chun Li <chunl2@cisco.com>
-rwxr-xr-xsrc/vnet/ip/ip4_forward.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 9c5775792b0..ebbf3e514c6 100755
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2487,6 +2487,8 @@ ip4_rewrite_inline (vlib_main_t * vm,
IP4_ERROR_SAME_INTERFACE : error1);
}
+ p0->error = error_node->errors[error0];
+ p1->error = error_node->errors[error1];
/* Don't adjust the buffer for ttl issue; icmp-error node wants
* to see the IP headerr */
if (PREDICT_TRUE (error0 == IP4_ERROR_NONE))