Skip to content
Snippets Groups Projects
Commit 0331a3ce authored by Neelansh Mittal's avatar Neelansh Mittal
Browse files

[openswan] Fix ipsec restart


1. Restart ipsec in offload mode, if it was running
in offload mode, before network topology change.

2. Get the wan iface from uci instead of using eth0.

Signed-off-by: default avatarNeelansh Mittal <neelanshm@codeaurora.org>
Change-Id: Icdd71107af40928dd010e6df1cfd1baa9da8ee3a
......@@ -15,8 +15,9 @@ proto=$(uci_get ipsec setup protostack)
[ -z "$proto" ] && return
ifaces=$(uci_get ipsec setup interfaces)
wan_iface=$(uci get network.wan.ifname)
[ -z "$ifaces" ] && ifaces="ipsec0=eth0"
[ -z "$ifaces" ] && ifaces="ipsec0=$wan_iface"
network_get_device ifname $INTERFACE
......@@ -33,6 +34,10 @@ restart_service(){
then
exit 0
fi
/etc/init.d/ipsec restart
if [ -f /tmp/qca_nss_ipsec_ol ]; then
/etc/init.d/qca-nss-ipsec restart
else
/etc/init.d/ipsec restart
fi
}
[ "$ACTION" = "ifup" ] && restart_service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment