diff --git a/devices/common/patches/syncdial.patch b/devices/common/patches/syncdial.patch index e717432..f363016 100644 --- a/devices/common/patches/syncdial.patch +++ b/devices/common/patches/syncdial.patch @@ -12,10 +12,43 @@ --- a/package/network/services/ppp/files/ppp.sh +++ b/package/network/services/ppp/files/ppp.sh -@@ -233,7 +233,15 @@ proto_pppoe_setup() { +@@ -74,7 +74,7 @@ ppp_generic_init_config() { + proto_config_add_string pppd_options + proto_config_add_string 'connect:file' + proto_config_add_string 'disconnect:file' +- [ -e /proc/sys/net/ipv6 ] && proto_config_add_string ipv6 ++ proto_config_add_string ipv6 + proto_config_add_boolean authfail + proto_config_add_int mtu + proto_config_add_string pppname +@@ -90,9 +90,7 @@ ppp_generic_setup() { + local config="$1"; shift + local localip + +- json_get_vars ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns sourcefilter delegate +- +- [ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6 ++ json_get_vars ipv6 ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns sourcefilter delegate + + if [ "$ipv6" = 0 ]; then + ipv6="" +@@ -157,9 +155,9 @@ ppp_generic_setup() { + ${connect:+connect "$connect"} \ + ${disconnect:+disconnect "$disconnect"} \ + ip-up-script /lib/netifd/ppp-up \ +- ${ipv6:+ipv6-up-script /lib/netifd/ppp6-up} \ ++ ipv6-up-script /lib/netifd/ppp6-up \ + ip-down-script /lib/netifd/ppp-down \ +- ${ipv6:+ipv6-down-script /lib/netifd/ppp-down} \ ++ ipv6-down-script /lib/netifd/ppp-down \ + ${mtu:+mtu $mtu mru $mtu} \ + "$@" $pppd_options + } +@@ -237,7 +235,16 @@ proto_pppoe_setup() { json_get_var padi_attempts padi_attempts json_get_var padi_timeout padi_timeout ++#By 蝈蝈:并发拨号同步的前期准备 + syncppp_option="" + [ "$(uci get syncdial.config.enabled)" -eq "1" ] && { + ppp_if_cnt=$(uci show network | grep -c "\.proto=\'pppoe\'$")