diff options
| author | Joel Low <joel@joelsplace.sg> | 2023-12-14 20:00:32 +0800 |
|---|---|---|
| committer | Rosen Penev <rosenp@gmail.com> | 2024-01-02 15:28:26 -0800 |
| commit | 4e1c175d48960c517d1f61ac0d5eb9c1149a5115 (patch) | |
| tree | 319e2365f69d9e31f26fb2034a3a2ec27641002c | |
| parent | 0f499ec4b835656199e92091ffb448e3ab22a072 (diff) | |
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 f2d209e4fff3048883ee5953c3a312d9f5aaab1b)
| -rw-r--r-- | net/strongswan/Makefile | 2 | ||||
| -rw-r--r-- | net/strongswan/files/swanctl.init | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index c106257bf..94b850b5e 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -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/ diff --git a/net/strongswan/files/swanctl.init b/net/strongswan/files/swanctl.init index e05c7228d..59933adb4 100644 --- a/net/strongswan/files/swanctl.init +++ b/net/strongswan/files/swanctl.init @@ -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() { |
