strongswan: comma separated list for {left,right}subnet
authorStephen Baker <redacted>
Mon, 24 Jun 2024 20:07:03 +0000 (15:07 -0500)
committerPhilip Prindeville <redacted>
Sun, 28 Jul 2024 21:56:17 +0000 (15:56 -0600)
Translate local_subnet and remote_subnet in /etc/config/ipsec into a comma separated list for leftsubnet and rightsubnet in /var/ipsec/ipsec.conf

net/strongswan/Makefile
net/strongswan/files/ipsec.init

index 82e890c8aa46c821e6385e38c840f04c124f5eaa..63525bfa05ad5cf9e7a902ac171b68e74d91a22f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=strongswan
 PKG_VERSION:=5.9.14
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
index c5588e8cf3c6e629148f6f2e51ceaf7a3a43a5a0..c94025ca778b21db21e35a6211ce88a5637d081a 100644 (file)
@@ -146,7 +146,7 @@ config_conn() {
        ipsec_xappend "  right=$remote_gateway"
 
        [ -n "$local_sourceip" ] && ipsec_xappend "  leftsourceip=$local_sourceip"
-       [ -n "$local_subnet" ] && ipsec_xappend "  leftsubnet=$local_subnet"
+       [ -n "$local_subnet" ] && ipsec_xappend "  leftsubnet=${local_subnet// /,}"
 
        [ -n "$local_firewall" ] && ipsec_xappend "  leftfirewall=$local_firewall"
        [ -n "$remote_firewall" ] && ipsec_xappend "  rightfirewall=$remote_firewall"
@@ -166,7 +166,7 @@ config_conn() {
                ipsec_xappend "  rightauth=psk"
 
                [ "$remote_sourceip" != "" ] && ipsec_xappend "  rightsourceip=$remote_sourceip"
-               [ "$remote_subnet" != "" ] && ipsec_xappend "  rightsubnet=$remote_subnet"
+               [ "$remote_subnet" != "" ] && ipsec_xappend "  rightsubnet=${remote_subnet// /,}"
 
                ipsec_xappend "  auto=$mode"
        else
git clone https://git.99rst.org/PROJECT