aboutsummaryrefslogtreecommitdiff
path: root/net/strongswan
diff options
context:
space:
mode:
authorVincent Wiemann <vincent.wiemann@ironai.com>2021-06-17 06:15:34 +0200
committerVincent Wiemann <vincent.wiemann@ironai.com>2021-06-18 04:42:01 +0200
commit59732ba01831b0ca6462975d86a2a7e2c23da0a7 (patch)
tree59b0a2bdd6c0b6c7dc70ff3e8b72ca8a068f5ed2 /net/strongswan
parent920e592654046aac90d2578c3766bd9fb6ae607c (diff)
strongswan: fix PSK config generation
There were closing curly braces missing and it was checking for empty strings while it should have been checking for non-empty strings. Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
Diffstat (limited to 'net/strongswan')
-rw-r--r--net/strongswan/Makefile2
-rw-r--r--net/strongswan/files/swanctl.init6
2 files changed, 5 insertions, 3 deletions
diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile
index 70f1e8e6f..596bd8e38 100644
--- a/net/strongswan/Makefile
+++ b/net/strongswan/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=strongswan
PKG_VERSION:=5.9.2
-PKG_RELEASE:=10
+PKG_RELEASE:=11
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 41d7dd5a2..884fefe38 100644
--- a/net/strongswan/files/swanctl.init
+++ b/net/strongswan/files/swanctl.init
@@ -486,12 +486,14 @@ config_remote() {
swanctl_xappend0 "secrets {"
swanctl_xappend1 "ike {"
swanctl_xappend2 "secret = $pre_shared_key"
- if [ -z "$local_id" ]; then
+ if [ -n "$local_id" ]; then
swanctl_xappend2 "id1 = $local_id"
- if [ -z "$remote_id" ]; then
+ if [ -n "$remote_id" ]; then
swanctl_xappend2 "id2 = $remote_id"
fi
fi
+ swanctl_xappend1 "}"
+ swanctl_xappend0 "}"
else
fatal "AuthenticationMode $auth_mode not supported"
fi