Fix number of issues 89/4389/2
authorRuoyu <ruoyu.ying@intel.com>
Thu, 5 Aug 2021 02:58:52 +0000 (10:58 +0800)
committerRuoyu <ruoyu.ying@intel.com>
Thu, 5 Aug 2021 03:10:51 +0000 (11:10 +0800)
- Change dependency rules set for hub-device connection
- Fix 'type' issue in ipsec.lua
- First change the updown script to create concrete vti tunnels

Change-Id: Iab381c4768240cebcf5eaff5d221349304c7bbaa
Signed-off-by: Ruoyu <ruoyu.ying@intel.com>
central-controller/src/scc/api/api.go
platform/cnf-openwrt/src/rest_v1/ipsec_rest.lua
platform/cnf-openwrt/src/updown

index 08604f2..648669f 100644 (file)
@@ -182,7 +182,6 @@ func NewRouter(
        ipRangeObjectClient.AddDepResManager(overlayObjectClient)
        certificateObjectClient.AddDepResManager(overlayObjectClient)
        hubDeviceObjectClient.AddDepResManager(hubObjectClient)
-       hubDeviceObjectClient.AddDepResManager(deviceObjectClient)
        hubConnObjectClient.AddDepResManager(hubObjectClient)
        deviceConnObjectClient.AddDepResManager(deviceObjectClient)
        hubCNFObjectClient.AddDepResManager(hubObjectClient)
index 2f0be5e..75ce2cc 100644 (file)
@@ -140,7 +140,7 @@ function is_vti_enabled(value)
     end
     uci:save(uci_conf)
     uci:commit(uci_conf)
-    return true, value
+    return true, mode
 end
 
 function save_cert(content, path)
index 85dde1f..fe4500e 100755 (executable)
@@ -12,8 +12,8 @@ VTI_IF="vti_${NET_IF}"
 
 case "${PLUTO_VERB}" in
     up-host)
-        #ip tunnel add "${VTI_IF}" local "${PLUTO_ME}" remote "${PLUTO_PEER}" mode vti \
-        ip tunnel add "${VTI_IF}" local "${PLUTO_ME}" remote 0.0.0.0 mode vti \
+        #ip tunnel add "${VTI_IF}" local "${PLUTO_ME}" remote 0.0.0.0 mode vti \
+        ip tunnel add "${VTI_IF}" local "${PLUTO_ME}" remote "${PLUTO_PEER}" mode vti \
             key "${PLUTO_MARK_OUT%%/*}"
         ip link set "${VTI_IF}" up
         ip route add "${PLUTO_PEER_SOURCEIP}" dev "${VTI_IF}" src "${PLUTO_ME}"