Fix ipv6 and keepalive ppp options in netifd proto_l2tp_setup script.

---
 net/xl2tpd/files/l2tp.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/xl2tpd/files/l2tp.sh b/net/xl2tpd/files/l2tp.sh
index c51300a..b0d5d4c 100644
--- a/net/xl2tpd/files/l2tp.sh
+++ b/net/xl2tpd/files/l2tp.sh
@@ -66,7 +66,7 @@ proto_l2tp_setup() {
 
        mkdir -p /tmp/l2tp
 
-       echo ${keepalive:+lcp-echo-interval $interval lcp-echo-failure 
${keepalive%%[, ]*}} > "${optfile}"
+       echo "${keepalive:+lcp-echo-interval $interval lcp-echo-failure 
${keepalive%%[, ]*}}" > "${optfile}"
        echo "${peerdns:+usepeerdns}" >> "${optfile}"
        echo "$defaultroute" >> "${optfile}"
        echo "${username:+user \"$username\" password \"$password\"}" >> 
"${optfile}"
@@ -78,7 +78,7 @@ proto_l2tp_setup() {
        echo "ipv6-down-script /lib/netifd/ppp-down" >> "${optfile}"
        # Don't wait for LCP term responses; exit immediately when killed.
        echo "lcp-max-terminate 0" >> "${optfile}"
-       echo "${ipv6} ${pppd_options}" >> "${optfile}"
+       echo "${ipv6:++ipv6} ${pppd_options}" >> "${optfile}"
        echo "${mtu:+mtu $mtu mru $mtu}" >> "${optfile}"
 
        xl2tpd-control add l2tp-${config} pppoptfile=${optfile} lns=${server} 
redial=yes redial timeout=20
-- 
1.7.11

Attachment: pgpjwPZo7i565.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to