mirror of
https://github.com/openwrt/packages.git
synced 2026-12-06 00:05:31 +04:00
strongswan: don't return early for legacy UCI config
start_service() returned right after legacy_prepare_env(), so no procd instance was created and charon was never started for legacy configs. Continue with the normal startup flow instead and log a notice asking users to migrate to the new schema. reload_service() now also calls legacy_prepare_env() instead of prepare_env() for legacy configs. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
1 parent
897e373ea9
commit
86d116d028
1 file changed
+10
-6
@@ -1265,7 +1265,11 @@ reload_service() {
|
||||
}
|
||||
|
||||
running && {
|
||||
prepare_env
|
||||
if is_legacy_config; then
|
||||
legacy_prepare_env
|
||||
else
|
||||
prepare_env
|
||||
fi
|
||||
[ $WAIT_FOR_INTF -eq 0 ] && {
|
||||
# Load '/var/swanctl/swanctl.conf'
|
||||
# NOTE: The command 'swanctl --load-all --noprompt'
|
||||
@@ -1324,12 +1328,12 @@ start_service() {
|
||||
return
|
||||
}
|
||||
|
||||
is_legacy_config && {
|
||||
if is_legacy_config; then
|
||||
logger -t ipsec -p user.notice "Legacy UCI config in use, starting anyway; please migrate to the new schema."
|
||||
legacy_prepare_env
|
||||
return
|
||||
}
|
||||
|
||||
prepare_env
|
||||
else
|
||||
prepare_env
|
||||
fi
|
||||
|
||||
[ $WAIT_FOR_INTF -eq 1 ] && return
|
||||
|
||||
|
||||
Reference in new issue
Block a user