Code Review
/
icn
/
sdwan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
b5d7f30
)
Fix the bug that ensures consistency
82/4682/3
author
Le Yao
<le.yao@intel.com>
Mon, 14 Feb 2022 00:59:44 +0000
(19:59 -0500)
committer
Le Yao
<le.yao@intel.com>
Mon, 14 Feb 2022 05:28:11 +0000
(
00:28
-0500)
Ip and interface are not configured correctly
Signed-off-by: Le Yao <le.yao@intel.com>
Change-Id: I108629dc96b59e8347a0d662c6ddf23429e1f2e4
platform/cnf-openwrt/src/rest_v1/nat_rest.lua
patch
|
blob
|
history
diff --git
a/platform/cnf-openwrt/src/rest_v1/nat_rest.lua
b/platform/cnf-openwrt/src/rest_v1/nat_rest.lua
index
adde1c2
..
629240c
100644
(file)
--- a/
platform/cnf-openwrt/src/rest_v1/nat_rest.lua
+++ b/
platform/cnf-openwrt/src/rest_v1/nat_rest.lua
@@
-50,6
+50,12
@@
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 dest == nil or dest == "" then
+ return false, "428:ip not found on all interfaces"
+ end
+ end
end
if target == "MASQUERADE" then