xl2tpd: tweak getting value of mtu config option.
authorYousong Zhou <yszhou4tech@gmail.com>
Tue, 11 Aug 2015 03:45:23 +0000 (11:45 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 14 Aug 2015 04:16:27 +0000 (12:16 +0800)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
net/xl2tpd/files/l2tp.sh

index ec4ee69acdc47cc29684d5761137906cddaad1ce..74c956c21e5ea69eeb3d786386805a9ab886e9d5 100644 (file)
@@ -54,8 +54,8 @@ proto_l2tp_setup() {
                done
        fi
 
-       local ipv6 demand keepalive username password pppd_options
-       json_get_vars ipv6 demand keepalive username password pppd_options
+       local ipv6 demand keepalive username password pppd_options mtu
+       json_get_vars ipv6 demand keepalive username password pppd_options mtu
        [ "$ipv6" = 1 ] || ipv6=""
        if [ "${demand:-0}" -gt 0 ]; then
                demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
@@ -63,9 +63,6 @@ proto_l2tp_setup() {
                demand="persist"
        fi
 
-       local mtu
-       [ -n "$mtu" ] || json_get_var mtu mtu
-
        local interval="${keepalive##*[, ]}"
        [ "$interval" != "$keepalive" ] || interval=5