From: Le Yao Date: Thu, 17 Feb 2022 01:19:08 +0000 (-0500) Subject: Fix wrong value usage X-Git-Tag: 21.12.03~3^2 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=89c68ad117ff409eb67c9b644499793b4872d15d;p=icn%2Fsdwan.git Fix wrong value usage Signed-off-by: Le Yao Change-Id: Ibf59509620bd7d7d62a492ea3b28f5d21e653dee --- diff --git a/platform/cnf-openwrt/src/rest_v1/nat_rest.lua b/platform/cnf-openwrt/src/rest_v1/nat_rest.lua index 629240c..fb60b9f 100644 --- a/platform/cnf-openwrt/src/rest_v1/nat_rest.lua +++ b/platform/cnf-openwrt/src/rest_v1/nat_rest.lua @@ -50,8 +50,8 @@ function check_nat(value) if value["dest"] == nil then return false, "dest is required for SNAT" end - if dest == "#source" then - dest = ifutil.get_name_by_ip(src_dip) + if value["dest"] == "#source" then + local dest = ifutil.get_name_by_ip(value["src_dip"]) if dest == nil or dest == "" then return false, "428:ip not found on all interfaces" end