当前位置: 首页 > 工具软件 > d0x3d > 使用案例 >

openwrt mwan3 启动时提示 ip: invalid argument '0x3d00/0x3F00' to 'fwmark'

阳俊德
2023-12-01

 

在一个比较旧的openwrt版本中,升级了mwan3的版本(自带版本好像不太好用),结果发现软件能启动,但是没有效果,于是执行了restart命令,查看了打印信息:

root@qicala:~# mwan3 restart
ip: invalid argument '0x3d00/0x3F00' to 'fwmark'
ip: invalid argument '0x3e00/0x3F00' to 'fwmark'
ip: invalid argument '0x3d00/0x3F00' to 'fwmark'
ip: invalid argument '0x3e00/0x3F00' to 'fwmark'
ip: invalid argument '0x100/0x3F00' to 'fwmark'
/sbin/hotplug-call: /etc/hotplug.d/iface/15-mwan3: line 481: network_get_metric: not found
uci: Entry not found
uci: Entry not found

解决的方法:

1、ip: invalid argument '0x3d00/0x3F00' to 'fwmark'

      用ip-full代替ip,我是用源码make menuconfig,选择"Network"->"Routing and Redirection"->"ip-full",编译的固件会自动用ip-full替代ip,如果在系统中直接通过opkj命令安装ip-full,可能需要修改/lib/mwan3/mwan3.sh的第三行 IP4="ip -4"和第四行 IP6="ip -6",例如:用/usr/sbin/ip (实际上是安装的ip-full)替代ip.

2、network_get_metric: not found

    /lib/functions/network.sh中增加一个函数:

 # 2: interface
 network_get_protocol() { __network_ifstatus "$1" "$2" ".proto"; }
 
+# determine the metric of the given logical interface
+# 1: destination variable
+# 2: interface
+network_get_metric() { __network_ifstatus "$1" "$2" ".metric"; }
+
 # determine the layer 3 linux network device of the given logical interface
 # 1: destination variable
 # 2: interface

安装上述方式改完后,mwan3功能正常,但是restart的时候依然有部分打印如下

uci: Entry not found
uci: Entry not found
grep: /var/etc/miniupnpd.conf: No such file or directory
uci: Entry not found
uci: Entry not found
grep: /var/etc/miniupnpd.conf: No such file or directory
 092911  WARN : Service section disabled! - TERMINATE
uci: Entry not found
uci: Entry not found
grep: /var/etc/miniupnpd.conf: No such file or directory
uci: Entry not found
uci: Entry not found
grep: /var/etc/miniupnpd.conf: No such file or directory

 

看了下,是因为/etc/hotplug.d/iface/50-miniupnpd这个脚本执行时出现的问题,具体是下面几句代码:

tmpconf="/var/etc/miniupnpd.conf"
extiface=$(uci get upnpd.config.external_iface)
extzone=$(uci get upnpd.config.external_zone)

grep -q "ext_ifname=$ifname" $tmpconf || /etc/init.d/miniupnpd restart

后面继续研究下怎么解决.

 

 

参考内容链接:https://forum.turris.cz/t/mwan3-after-update-not-working/8862

 

 

 类似资料: