summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-01-30 03:04:17 -0800
committerOle Trøan <otroan@employees.org>2018-01-31 17:28:55 +0000
commitf7ad5cbe819533523169e8a88876b94b9f38789c (patch)
tree9e2776f7d7d1f22675bf67e12df066b149834a78 /src/plugins/nat/nat.c
parentb793d097c55ef28787e8e7ca39039f5be498cbf7 (diff)
NAT44: in2out output feature skip translation for already translated packets (VPP-1156)
Change-Id: I5395245c9e49f741a949ada1f725c34f9379c249 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rw-r--r--src/plugins/nat/nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 38caae43376..ef740d9d12b 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -774,7 +774,7 @@ int snat_add_static_mapping(ip4_address_t l_addr, ip4_address_t e_addr,
}
}
/* External address must be allocated */
- if (!a)
+ if (!a && (l_addr.as_u32 != e_addr.as_u32))
return VNET_API_ERROR_NO_SUCH_ENTRY;
}