From: Chun Li Date: Wed, 7 Feb 2018 01:58:28 +0000 (+0800) Subject: ip4_forward: set pkt error in case potential memory corrupt X-Git-Tag: v18.04-rc1~345 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=ef56fae51a8683ec6ceeb01e1374cde2ba30c1e5;p=vpp.git ip4_forward: set pkt error in case potential memory corrupt Change-Id: Ib9eb65d2ba166f5883a8ce8d37298c696113f2be Signed-off-by: Chun Li --- diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index ff582960ed0..ae4510626d0 100644 --- a/src/vnet/ip/ip4_forward.c +++ b/src/vnet/ip/ip4_forward.c @@ -2130,6 +2130,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))