aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/plugins/nat/nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 1d493a6d346..5953c42f0fd 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -759,14 +759,14 @@ int snat_add_static_mapping(ip4_address_t l_addr, ip4_address_t e_addr,
for (i = 0; i < vec_len (sm->to_resolve); i++)
{
rp = sm->to_resolve + i;
- if (rp->sw_if_index != sw_if_index &&
- rp->l_addr.as_u32 != l_addr.as_u32 &&
- rp->vrf_id != vrf_id && rp->addr_only != addr_only)
+ if (rp->sw_if_index != sw_if_index ||
+ rp->l_addr.as_u32 != l_addr.as_u32 ||
+ rp->vrf_id != vrf_id || rp->addr_only != addr_only)
continue;
if (!addr_only)
{
- if (rp->l_port != l_port && rp->e_port != e_port && rp->proto != proto)
+ if (rp->l_port != l_port || rp->e_port != e_port || rp->proto != proto)
continue;
}