strongswan: trigger reload when interfaces are specified

Fixes #20848

Add interface triggers if interfaces to listen to are specified in
`/etc/config/ipsec`. This fixes the "running with no instances" scenario
after rebooting a router.

Signed-off-by: Joel Low <joel@joelsplace.sg>
(cherry picked from commit f2d209e4ff)
This commit is contained in:
Joel Low 2023-12-14 20:00:32 +08:00 committed by Rosen Penev
parent 0f499ec4b8
commit 4e1c175d48
2 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=strongswan
PKG_VERSION:=5.9.11
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/

View File

@ -702,6 +702,16 @@ stop_service() {
service_triggers() {
procd_add_reload_trigger "ipsec"
config load "ipsec"
config_foreach service_trigger_ipsec ipsec
}
service_trigger_ipsec() {
local interface interface_list
config_list_foreach "$1" interface append_var interface_list
for interface in $interface_list; do
procd_add_reload_interface_trigger $interface
done
}
start_service() {