immortalwrt-mt798x
immortalwrt-mt798x copied to clipboard
随机性 断线重拨 无ipv6 问题
Describe the bug
发现一个随即性bug: 被运营商断线后重拨wan口重拨好了,但是有小概率会出现wan_6没有及时down,导致内网没有ipv6,手机无法上网。
ImmortalWrt version
ImmortalWrt 21.02-SNAPSHOT r20568-3fa9687ca7 / LuCI openwrt-21.02 branch git-23.098.38725-847bd6b
ImmortalWrt target/subtarget
ImmortalWrt 21.02-SNAPSHOT r20568-3fa9687ca7 / LuCI openwrt-21.02 branch git-23.098.38725-847bd6b
Device
360t7
Image kind
Self-built image
Steps to reproduce
发现一个随即性bug: 被运营商断线后重拨wan口重拨好了,但是有小概率会出现wan_6没有及时down,导致内网没有ipv6,手机无法上网。
正常日志是这样的: Thu Mar 21 03:24:55 2024 daemon.info pppd[25833]: LCP terminated by peer Thu Mar 21 03:24:55 2024 daemon.info pppd[25833]: Connect time 2880.4 minutes. Thu Mar 21 03:24:55 2024 daemon.info pppd[25833]: Sent 899341005 bytes, received 2761652706 bytes. Thu Mar 21 03:24:55 2024 daemon.notice netifd: Network device 'pppoe-wan' link is down Thu Mar 21 03:24:55 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is down Thu Mar 21 03:24:55 2024 daemon.notice netifd: Interface 'wan_6' has link connectivity loss Thu Mar 21 03:24:55 2024 daemon.err odhcp6c[25971]: Failed to send RS (Permission denied) Thu Mar 21 03:24:55 2024 daemon.err odhcp6c[25971]: Failed to send RELEASE message to ff02::1:2 (Permission denied) Thu Mar 21 03:24:55 2024 daemon.notice netifd: Interface 'wan' has lost the connection Thu Mar 21 03:24:56 2024 daemon.notice netifd: wan_6 (25971): Command failed: Permission denied Thu Mar 21 03:24:56 2024 daemon.notice pppd[25833]: Modem hangup Thu Mar 21 03:24:56 2024 daemon.notice pppd[25833]: Connection terminated. Thu Mar 21 03:24:56 2024 daemon.info pppd[25833]: Connect time 2880.4 minutes. Thu Mar 21 03:24:56 2024 daemon.info pppd[25833]: Sent 899341005 bytes, received 2761652706 bytes. Thu Mar 21 03:24:56 2024 daemon.info pppd[25833]: Sent PADT Thu Mar 21 03:24:56 2024 daemon.info pppd[25833]: Exit. Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan' is now down Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan' is setting up now Thu Mar 21 03:24:56 2024 daemon.err insmod: module is already loaded - slhc Thu Mar 21 03:24:56 2024 daemon.err insmod: module is already loaded - ppp_generic Thu Mar 21 03:24:56 2024 daemon.err insmod: module is already loaded - pppox Thu Mar 21 03:24:56 2024 daemon.err insmod: module is already loaded - pppoe Thu Mar 21 03:24:56 2024 daemon.notice netifd: wan (11364): uci: Entry not found Thu Mar 21 03:24:56 2024 daemon.notice netifd: wan (11364): sh: out of range Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: Plugin rp-pppoe.so loaded. Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.8 Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: pppd 2.4.8 started by root, uid 0 Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: PPP session is 49913 Thu Mar 21 03:24:56 2024 daemon.warn pppd[11411]: Connected to 70:62:0e:14:ff:0d via interface eth1 Thu Mar 21 03:24:56 2024 kern.info kernel: [549519.660368] pppoe-wan: renamed from ppp0 Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: Renamed interface ppp0 to pppoe-wan Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: Using interface pppoe-wan Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: Connect: pppoe-wan <--> eth1 Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: syncppp not active Thu Mar 21 03:24:56 2024 daemon.err odhcp6c[25971]: Failed to send SOLICIT message to ff02::1:2 (Permission denied) Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan_6' is now down Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan_6' is disabled Thu Mar 21 03:24:56 2024 daemon.info pppd[11411]: Remote message: Authentication Successful,Welcome! Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: PAP authentication succeeded Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: peer from calling number 70:62:0E:14:FF:0D authorized Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: local IP address 100.64.39.142 Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: remote IP address 100.64.0.1 Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: primary DNS address 202.96.128.86 Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: secondary DNS address 202.96.134.33 Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: local LL address fe80::e2ef:0273:c3f2:6eb5 Thu Mar 21 03:24:56 2024 daemon.notice pppd[11411]: remote LL address fe80::7262:0eff:fe14:ff0d Thu Mar 21 03:24:56 2024 daemon.notice netifd: Network device 'pppoe-wan' link is up Thu Mar 21 03:24:56 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is up Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan' is now up Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan_6' is enabled Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan_6' has link connectivity Thu Mar 21 03:24:56 2024 daemon.notice netifd: Interface 'wan_6' is setting up now Thu Mar 21 03:24:57 2024 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan) Thu Mar 21 03:24:57 2024 user.notice ddns-scripts[11765]: myddns_ipv4: PID '11765' started at 2024-03-21 03:24 Thu Mar 21 03:24:57 2024 user.warn ddns-scripts[11765]: myddns_ipv4: Service section disabled! - TERMINATE Thu Mar 21 03:24:57 2024 user.warn ddns-scripts[11765]: myddns_ipv4: PID '11765' exit WITH ERROR '1' at 2024-03-21 03:24 Thu Mar 21 03:25:01 2024 daemon.notice netifd: Interface 'wan_6' is now up Thu Mar 21 03:25:01 2024 user.notice firewall: Reloading firewall due to ifup of wan_6 (pppoe-wan)
出问题时日志是这样的: Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: LCP terminated by peer Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: Connect time 2880.3 minutes. Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: Sent 849187132 bytes, received 1971306970 bytes. Sat Mar 23 03:25:14 2024 daemon.notice netifd: Network device 'pppoe-wan' link is down Sat Mar 23 03:25:14 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is down Sat Mar 23 03:25:14 2024 daemon.notice netifd: Interface 'wan_6' has link connectivity loss Sat Mar 23 03:25:14 2024 daemon.err odhcp6c[11546]: Failed to send RELEASE message to ff02::1:2 (Permission denied) Sat Mar 23 03:25:14 2024 daemon.notice netifd: Interface 'wan' has lost the connection Sat Mar 23 03:25:14 2024 daemon.notice netifd: wan_6 (11546): Command failed: Permission denied Sat Mar 23 03:25:14 2024 daemon.notice pppd[11411]: Modem hangup Sat Mar 23 03:25:14 2024 daemon.notice pppd[11411]: Connection terminated. Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: Connect time 2880.3 minutes. Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: Sent 849187132 bytes, received 1971306970 bytes. Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: Sent PADT Sat Mar 23 03:25:14 2024 daemon.info pppd[11411]: Exit. Sat Mar 23 03:25:14 2024 daemon.notice netifd: Interface 'wan' is now down Sat Mar 23 03:25:14 2024 daemon.notice netifd: Interface 'wan' is setting up now Sat Mar 23 03:25:14 2024 daemon.err insmod: module is already loaded - slhc Sat Mar 23 03:25:14 2024 daemon.err insmod: module is already loaded - ppp_generic Sat Mar 23 03:25:14 2024 daemon.err insmod: module is already loaded - pppox Sat Mar 23 03:25:14 2024 daemon.err insmod: module is already loaded - pppoe Sat Mar 23 03:25:14 2024 daemon.notice netifd: wan (28567): uci: Entry not found Sat Mar 23 03:25:14 2024 daemon.notice netifd: wan (28567): sh: out of range Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: Plugin rp-pppoe.so loaded. Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.8 Sat Mar 23 03:25:14 2024 daemon.notice pppd[28609]: pppd 2.4.8 started by root, uid 0 Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: PPP session is 21518 Sat Mar 23 03:25:14 2024 daemon.warn pppd[28609]: Connected to 70:62:0e:14:ff:0d via interface eth1 Sat Mar 23 03:25:14 2024 kern.info kernel: [722294.286220] pppoe-wan: renamed from ppp0 Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: Renamed interface ppp0 to pppoe-wan Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: Using interface pppoe-wan Sat Mar 23 03:25:14 2024 daemon.notice pppd[28609]: Connect: pppoe-wan <--> eth1 Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: syncppp not active Sat Mar 23 03:25:14 2024 daemon.info pppd[28609]: Remote message: Authentication Successful,Welcome! Sat Mar 23 03:25:14 2024 daemon.notice pppd[28609]: PAP authentication succeeded Sat Mar 23 03:25:14 2024 daemon.notice pppd[28609]: peer from calling number 70:62:0E:14:FF:0D authorized Sat Mar 23 03:25:15 2024 daemon.notice pppd[28609]: local IP address 100.64.39.142 Sat Mar 23 03:25:15 2024 daemon.notice pppd[28609]: remote IP address 100.64.0.1 Sat Mar 23 03:25:15 2024 daemon.notice pppd[28609]: primary DNS address 202.96.128.86 Sat Mar 23 03:25:15 2024 daemon.notice pppd[28609]: secondary DNS address 202.96.134.33 Sat Mar 23 03:25:15 2024 daemon.notice netifd: Network device 'pppoe-wan' link is up Sat Mar 23 03:25:15 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is up Sat Mar 23 03:25:15 2024 daemon.notice netifd: Interface 'wan_6' has link connectivity Sat Mar 23 03:25:15 2024 daemon.notice pppd[28609]: local LL address fe80::e2ef:028d:8ff2:6eb5 Sat Mar 23 03:25:15 2024 daemon.notice pppd[28609]: remote LL address fe80::7262:0eff:fe14:ff0d Sat Mar 23 03:25:15 2024 daemon.notice netifd: Interface 'wan' is now up Sat Mar 23 03:25:15 2024 daemon.err odhcp6c[11546]: Failed to send SOLICIT message to ff02::1:2 (Permission denied) Sat Mar 23 03:25:15 2024 daemon.notice netifd: Interface 'wan_6' is now down Sat Mar 23 03:25:15 2024 daemon.notice netifd: Interface 'wan_6' is disabled Sat Mar 23 03:25:15 2024 daemon.notice netifd: Interface 'wan_6' has link connectivity loss Sat Mar 23 03:25:15 2024 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan)
感觉问题是 还没来得及把wan_6 down了,wan已经重播成功连上了。 应该在将wan down时 立刻将wan_6 down了,就没这个问题了。
Actual behaviour
No response
Expected behaviour
No response
Additional info
No response
Diffconfig
No response
Terms
- [X] I am reporting an issue for ImmortalWrt, not an unsupported fork.
wan_6
是自动配置的虚拟接口还是手动配置的接口?
如果是手动配置的接口,将其设置为 wan
的接口别名。
https://github.com/hanwckf/immortalwrt-mt798x/issues/57
我是用几天突然就没网络啦 登录看到丢失ipv6 所有网络崩了 然后pppoe重启就又好了 过几天又突然没网啦 设备:rax3000m-emmc Powered by LuCI openwrt-21.02 branch (git-23.098.38725-847bd6b)
+1 运营商强制掉线重拨 ipv4正常 ipv6挂了
#57
按照上诉内容,可以
- 手工修改路由器文件 /lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3
- 修改源码,重新编译 源码文件 immortalwrt-mt798x/package/network/services/ppp/files/lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3
正在测试,一般要一个星期才会碰到一次。
#57
按照上诉内容,可以
- 手工修改路由器文件 /lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3
- 修改源码,重新编译 源码文件 immortalwrt-mt798x/package/network/services/ppp/files/lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3
正在测试,一般要一个星期才会碰到一次。
改后问题确实没有再出现了。
#57
按照上诉内容,可以
- 手工修改路由器文件 /lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3
- 修改源码,重新编译 源码文件 immortalwrt-mt798x/package/network/services/ppp/files/lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3 正在测试,一般要一个星期才会碰到一次。
改后问题确实没有再出现了。
请问这个sleep 3具体加在哪个地方呀, vi打开ppp-down后是这样的
#!/bin/sh
PPP_IPPARAM="$6"
. /lib/netifd/netifd-proto.sh
proto_init_update "$IFNAME" 0
proto_send_update "$PPP_IPPARAM"
[ -d /etc/ppp/ip-down.d ] && {
for SCRIPT in /etc/ppp/ip-down.d/*
do
[ -x "$SCRIPT" ] && "$SCRIPT" "$@"
done
}
~
~
~
#57
按照上诉内容,可以
- 手工修改路由器文件 /lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3
- 修改源码,重新编译 源码文件 immortalwrt-mt798x/package/network/services/ppp/files/lib/netifd/ppp-down 末尾添加等待几秒:
sleep 3 正在测试,一般要一个星期才会碰到一次。
改后问题确实没有再出现了。
请问这个sleep 3具体加在哪个地方呀, vi打开ppp-down后是这样的
#!/bin/sh PPP_IPPARAM="$6" . /lib/netifd/netifd-proto.sh proto_init_update "$IFNAME" 0 proto_send_update "$PPP_IPPARAM" [ -d /etc/ppp/ip-down.d ] && { for SCRIPT in /etc/ppp/ip-down.d/* do [ -x "$SCRIPT" ] && "$SCRIPT" "$@" done } ~ ~ ~
就是在最后一行加啊
#!/bin/sh PPP_IPPARAM="$6"
. /lib/netifd/netifd-proto.sh proto_init_update "$IFNAME" 0 proto_send_update "$PPP_IPPARAM"
[ -d /etc/ppp/ip-down.d ] && { for SCRIPT in /etc/ppp/ip-down.d/* do [ -x "$SCRIPT" ] && "$SCRIPT" "$@" done } sleep 3