Skip to content

Commit

Permalink
Update syncdial.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mgz0227 authored Jan 10, 2025
1 parent 5742186 commit 617ca1b
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion devices/common/patches/syncdial.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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\'$")
Expand Down

0 comments on commit 617ca1b

Please sign in to comment.