From: Stephen Baker Date: Mon, 24 Jun 2024 20:07:03 +0000 (-0500) Subject: strongswan: comma separated list for {left,right}subnet X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=292f29474be38afe941cf136ff1122a94bd937bf;p=openwrt-packages.git strongswan: comma separated list for {left,right}subnet Translate local_subnet and remote_subnet in /etc/config/ipsec into a comma separated list for leftsubnet and rightsubnet in /var/ipsec/ipsec.conf --- diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index 82e890c8a..63525bfa0 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -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/ diff --git a/net/strongswan/files/ipsec.init b/net/strongswan/files/ipsec.init index c5588e8cf..c94025ca7 100644 --- a/net/strongswan/files/ipsec.init +++ b/net/strongswan/files/ipsec.init @@ -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