diff options
author | Chun Li <chunl2@cisco.com> | 2018-02-07 09:58:28 +0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-02-09 13:14:46 +0000 |
commit | ef56fae51a8683ec6ceeb01e1374cde2ba30c1e5 (patch) | |
tree | 9a8f12716e6dfb5c93a8becb8c826a5ba25f0374 /src | |
parent | 15e598c76e815786dea8e964db7b6de35a2fc4ca (diff) |
ip4_forward: set pkt error in case potential memory corrupt
Change-Id: Ib9eb65d2ba166f5883a8ce8d37298c696113f2be
Signed-off-by: Chun Li <chunl2@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/ip/ip4_forward.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |