1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00

Merge pull request #226 from Ysurac/develop

sync
This commit is contained in:
suyuan 2022-03-17 17:11:27 +08:00 committed by GitHub
commit 4e4e1b0bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 1 deletions

View file

@ -1160,7 +1160,7 @@ function interfaces_status()
--end
duplicateif = false
if ifname ~= "" and ifname ~= nil and not (section["device"] ~= nil and section["device"]:match("^@.*")) then
if ifname ~= "" and ifname ~= nil and not (section["device"] ~= nil and section["device"]:match("^@.*")) and (proto == "static" or proto == "dhcp") then
if allintf[ifname] then
connectivity = "ERROR"
duplicateif = true

View file

@ -306,6 +306,54 @@ sed -i 's/omrip/oip/g' /etc/config/*
uci -q delete network.loopback.ifname
uci -q set network.loopback.device='lo'
local board=$(board_name)
if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ] && [ "$(mnf_info -n)" = "RUTX1200XXXX" ]; then
uci -q batch <<-EOF
set network.modem1=interface
set network.modem1.proto='modemmanager'
set network.modem1.apn=''
set network.modem1.auth='none'
set network.modem1.iptype='ipv4v6'
set network.modem1.addlatency='0'
set network.modem1.force_link='1'
set network.modem1.device='/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1'
set network.wan_modem1=interface
set network.wan_modem1.proto='dhcp'
set network.wan_modem1.device='wwan0'
set network.wan_modem1.force_link='1'
set network.wan_modem1.multipath='on'
set network.wan_modem1.addlatency='0'
set network.wan_modem1.hostname='*'
set network.wan_modem1.defaultroute='0'
set network.wan_modem1.peerdns='0'
set network.wan_modem1.ip4table=wan
commit network
add_list firewall.@zone[1].network='wan_modem1'
commit firewall
set network.modem2=interface
set network.modem2.proto='modemmanager'
set network.modem2.apn=''
set network.modem2.auth='none'
set network.modem2.iptype='ipv4v6'
set network.modem2.addlatency='0'
set network.modem2.force_link='1'
set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2'
set network.wan_modem2=interface
set network.wan_modem2.proto='dhcp'
set network.wan_modem2.device='wwan1'
set network.wan_modem2.force_link='1'
set network.wan_modem2.multipath='on'
set network.wan_modem2.addlatency='0'
set network.wan_modem2.hostname='*'
set network.wan_modem2.defaultroute='0'
set network.wan_modem2.peerdns='0'
set network.wan_modem2.ip4table=wan
commit network
add_list firewall.@zone[1].network='wan_modem2'
commit firewall
EOF
fi
uci -q commit macvlan
uci -q commit network
rm -f /tmp/luci-indexcache