diff --git a/luci-app-iperf/root/etc/config/iperf b/luci-app-iperf/root/etc/config/iperf
index 2067c865e..be4baabb4 100755
--- a/luci-app-iperf/root/etc/config/iperf
+++ b/luci-app-iperf/root/etc/config/iperf
@@ -95,7 +95,7 @@ config server 'he'
option udp '1'
option location 'America'
-config server 'biznetnetworks.com'
+config server 'biznetnetworks'
option host 'iperf.biznetnetworks.com'
option ipv4 '1'
option ipv6 '1'
diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua
index 9e94a08a1..fabf6d97a 100755
--- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua
+++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua
@@ -1197,11 +1197,11 @@ function settings_add()
ucic:set("firewall",section[".name"],"auto_helper",sipalg)
end)
if sipalg == "1" then
- luci.sys.call("modprobe nf_conntrack_ip >/dev/null 2>/dev/null")
- luci.sys.call("modprobe nf_nat_sip >/dev/null 2>/dev/null")
+ luci.sys.call("modprobe -q nf_conntrack_sip >/dev/null 2>/dev/null")
+ luci.sys.call("modprobe -q nf_nat_sip >/dev/null 2>/dev/null")
else
luci.sys.call("rmmod nf_nat_sip >/dev/null 2>/dev/null")
- luci.sys.call("rmmod nf_conntrack_ip >/dev/null 2>/dev/null")
+ luci.sys.call("rmmod nf_conntrack_sip >/dev/null 2>/dev/null")
end
ucic:save("openmptcprouter")
diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
index e447518f4..f86b61ce7 100755
--- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
+++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
@@ -9,6 +9,8 @@
local ifaces = sys.net:devices()
local ifttyu = nixio.fs.glob("/dev/ttyUSB*")
local ifttyc = nixio.fs.glob("/dev/cdc-wdm*")
+ local sqm = luci.sys.exec("opkg list-installed | grep -q luci-app-sqm && echo -n '1' || echo -n '0'")
+ local qos = luci.sys.exec("opkg list-installed | grep -q luci-app-qos && echo -n '1' || echo -n '0'")
menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter"
function device_notvirtual(dev)
if dev:match("^eth.*") or dev:match("^wwan.*") or dev:match("^tun.*") or dev:match("/") then
@@ -932,16 +934,39 @@
+ <%
+ if sqm == "1" then
+ %>
checked<% end %> />
+ <%:SQM control bufferloat: the undesirable latency that arises when the router buffers too much data.%>
<%:You should disable SQM for LTE or any interfaces with variable speed.%>
+ <%
+ end
+ %>
+ <%
+ if qos == "1" then
+ %>
+
+
+
+ checked<% end %> />
+
+
+ <%:QoS permit to prioritize any upload traffic.%>
+
+
+
+ <%
+ end
+ %>
diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp
index 9eb53107a..29f4a354e 100755
--- a/mptcp/files/etc/init.d/mptcp
+++ b/mptcp/files/etc/init.d/mptcp
@@ -133,6 +133,7 @@ interface_multipath_settings() {
[ -z "$mptcpmintf" ] && mptcpmintf="$config"
uci -q set network.${config}.defaultroute=0
uci -q set network.${config}.peerdns=0
+ echo '' > /etc/resolv.conf 2>&1 >/dev/null
}
[ "$mode" = "master" ] && {
# Force that only one interface is master
@@ -166,6 +167,7 @@ interface_multipath_settings() {
[ "$config" = "omrvpn" ] && mode="off"
[ -n "$(ifconfig | grep $iface)" ] || return 0
[ "$(echo $iface | grep _dev)" != "" ] && return 0
+ [ "$(echo $iface | grep '^if')" != "" ] && return 0
if [ "$mode" = "master" ]; then
multipath "$iface" "on"
@@ -263,7 +265,7 @@ interface_multipath_settings() {
ip route replace $network/$netmask dev $iface scope link metric $id 2>&1 >/dev/null
ip route replace $network/$netmask dev $iface scope link table $id 2>&1 >/dev/null
ip route replace default via $gateway dev $iface table $id 2>&1 >/dev/null
- ip route replace default via $gateway dev $iface metric $id 2>&1 >/dev/null
+ [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ] && ip route replace default via $gateway dev $iface metric $id 2>&1 >/dev/null
#ip route flush $id
fi
@@ -350,7 +352,7 @@ interface_multipath_settings() {
ip -6 route replace $network6/$netmask6 dev $iface scope link metric 6$id 2>&1 >/dev/null
ip -6 route replace $network6/$netmask6 dev $iface scope link table 6$id 2>&1 >/dev/null
ip -6 route replace default via $gateway6 dev $iface table 6$id 2>&1 >/dev/null
- ip -6 route replace default via $gateway6 dev $iface metric 6$id 2>&1 >/dev/null
+ [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ] && ip -6 route replace default via $gateway6 dev $iface metric 6$id 2>&1 >/dev/null
#ip -6 route flush 6$id 2>&1 >/dev/null
fi
diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking
index 1efcca695..a6b4858fd 100755
--- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking
+++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking
@@ -563,7 +563,7 @@ set_server_route() {
fi
}
config_list_foreach $server ip server_route
- if [ -n "$metric" ] && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip route show dev $OMR_TRACKER_DEVICE metric $metric | grep default | grep $OMR_TRACKER_DEVICE_GATEWAY)" = "" ] && [ "$multipath_config_route" != "off" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then
+ if [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ] && [ -n "$metric" ] && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip route show dev $OMR_TRACKER_DEVICE metric $metric | grep default | grep $OMR_TRACKER_DEVICE_GATEWAY)" = "" ] && [ "$multipath_config_route" != "off" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then
ip route replace default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $metric 2>&1 >/dev/null
fi
}
@@ -601,7 +601,7 @@ set_server_route6() {
fi
}
config_list_foreach $server ip server_route
- if [ "$OMR_TRACKER_DEVICE_GATEWAY6" != "" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ -n "$metric" ] && [ "$(ip -6 route show dev $OMR_TRACKER_DEVICE metric $metric | grep default | grep $OMR_TRACKER_DEVICE_GATEWAY6)" = "" ] && [ "$multipath_config_route" != "off" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then
+ if [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ] && [ "$OMR_TRACKER_DEVICE_GATEWAY6" != "" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ -n "$metric" ] && [ "$(ip -6 route show dev $OMR_TRACKER_DEVICE metric $metric | grep default | grep $OMR_TRACKER_DEVICE_GATEWAY6)" = "" ] && [ "$multipath_config_route" != "off" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then
ip -6 route replace default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE metric $metric 2>&1 >/dev/null
fi
}
@@ -1164,7 +1164,7 @@ if [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
elif [ "$(uci -q get openmptcprouter.settings.master)" != "failover" ]; then
config_foreach set_server_route server
fi
- if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then
+ if [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then
_log "Interface route not yet set, set route ip r add default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric)"
ip r add default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric) >/dev/null 2>&1
fi
@@ -1177,7 +1177,7 @@ if [ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ]; th
elif [ "$(uci -q get openmptcprouter.settings.master)" != "failover" ]; then
config_foreach set_server_route6 server
fi
- if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then
+ if [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then
ip -6 r replace default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric) >/dev/null 2>&1
fi
fi
diff --git a/openmptcprouter/files/etc/uci-defaults/1960-omr-qos b/openmptcprouter/files/etc/uci-defaults/1960-omr-qos
index eaf728dc3..1eba41af4 100755
--- a/openmptcprouter/files/etc/uci-defaults/1960-omr-qos
+++ b/openmptcprouter/files/etc/uci-defaults/1960-omr-qos
@@ -1,58 +1,56 @@
#!/bin/sh
-if [ "$(uci -q get openmptcprouter.latest_versions)" ]; then
- if [ "$(uci -q get qos.wan1)" = "" ]; then
+if [ -z "$(uci -q get qos.omrvpn)" ]; then
+ uci -q batch <<-EOF >/dev/null
+ delete qos.wan
+ set qos.wan1=interface
+ set qos.wan1.classgroup="Default"
+ set qos.wan1.enabled="0"
+ set qos.wan1.upload="4000"
+ set qos.wan1.download="100000"
+ set qos.wan2=interface
+ set qos.wan2.classgroup="Default"
+ set qos.wan2.enabled="0"
+ set qos.wan2.upload="4000"
+ set qos.wan2.download="100000"
+ set qos.omrvpn=interface
+ set qos.omrvpn.classgroup="Default"
+ set qos.omrvpn.enabled="0"
+ set qos.omrvpn.interface="tun0"
+ set qos.omrvpn.upload="0"
+ set qos.omrvpn.download="0"
+ set qos.omrvpn.qdisc="cake"
+ set qos.omrvpn.script="layer_cake.qos"
+ delete qos.@classify[-1]
+ add qos classify
+ set qos.@classify[-1].target='Express'
+ set qos.@classify[-1].ports='5600'
+ set qos.@classify[-1].comments='SIP'
+ add qos classify
+ set qos.@classify[-1].target='Express'
+ set qos.@classify[-1].portrange='27000-27050'
+ set qos.@classify[-1].proto='udp'
+ set qos.@classify[-1].comments='Steam'
+ commit qos
+ EOF
+ if [ "$(uci -q get network.wan3)" != "" ]; then
uci -q batch <<-EOF >/dev/null
- delete qos.wan
- set qos.wan1=interface
- set qos.wan1.classgroup="Default"
- set qos.wan1.enabled="0"
- set qos.wan1.upload="4000"
- set qos.wan1.download="100000"
- set qos.wan2=interface
- set qos.wan2.classgroup="Default"
- set qos.wan2.enabled="0"
- set qos.wan2.upload="4000"
- set qos.wan2.download="100000"
- set qos.omrvpn=interface
- set qos.omrvpn.classgroup="Default"
- set qos.omrvpn.enabled="1"
- set qos.omrvpn.interface="tun0"
- set qos.omrvpn.upload="0"
- set qos.omrvpn.download="0"
- set qos.omrvpn.qdisc="cake"
- set qos.omrvpn.script="layer_cake.qos"
- delete qos.@classify[-1]
- add qos classify
- set qos.@classify[-1].target='Express'
- set qos.@classify[-1].ports='5600'
- set qos.@classify[-1].comments='SIP'
- add qos classify
- set qos.@classify[-1].target='Express'
- set qos.@classify[-1].portrange='27000-27050'
- set qos.@classify[-1].proto='udp'
- set qos.@classify[-1].comments='Steam'
+ set qos.wan3=interface
+ set qos.wan3.classgroup="Default"
+ set qos.wan3.enabled="0"
+ set qos.wan3.upload="4000"
+ set qos.wan3.download="100000"
+ commit qos
+ EOF
+ fi
+ if [ "$(uci -q get network.wan4)" != "" ]; then
+ uci -q batch <<-EOF >/dev/null
+ set qos.wan4=interface
+ set qos.wan4.classgroup="Default"
+ set qos.wan4.enabled="0"
+ set qos.wan4.upload="4000"
+ set qos.wan4.download="100000"
commit qos
EOF
- if [ "$(uci -q get network.wan3)" != "" ]; then
- uci -q batch <<-EOF >/dev/null
- set qos.wan3=interface
- set qos.wan3.classgroup="Default"
- set qos.wan3.enabled="0"
- set qos.wan3.upload="4000"
- set qos.wan3.download="100000"
- commit qos
- EOF
- fi
- if [ "$(uci -q get network.wan4)" != "" ]; then
- uci -q batch <<-EOF >/dev/null
- set qos.wan4=interface
- set qos.wan4.classgroup="Default"
- set qos.wan4.enabled="0"
- set qos.wan4.upload="4000"
- set qos.wan4.download="100000"
- commit qos
- EOF
- fi
fi
fi
rm -f /tmp/luci-indexcache