summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ed/nat44_ed_api.c
diff options
context:
space:
mode:
authorHuawei LI <lihuawei_zzu@163.com>2022-12-03 11:30:49 +0800
committerOle Tr�an <otroan@employees.org>2022-12-19 08:07:11 +0000
commitaff4d320f0fe9ce68fcb83ee9ab0abc2d8612644 (patch)
tree5d1b393c14cc307ac328a6a819ea4845eba8e352 /src/plugins/nat/nat44-ed/nat44_ed_api.c
parentf1b97bf1d989e34d1c6b0c689a107d74e495f5d0 (diff)
nat: fix incorrect using about sw_if_index in nat44-ed static mapping v2 api.
Type: fix Signed-off-by: Huawei LI <lihuawei_zzu@163.com> Change-Id: I2a96ab0dafe4db796704341c325c43a6960be312
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed_api.c')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_api.c b/src/plugins/nat/nat44-ed/nat44_ed_api.c
index ea29514d729..56e29601f35 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed_api.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed_api.c
@@ -590,7 +590,7 @@ static void
}
sw_if_index = clib_net_to_host_u32 (mp->external_sw_if_index);
- if (sw_if_index)
+ if (sw_if_index != ~0)
{
flags |= NAT_SM_FLAG_SWITCH_ADDRESS;
}