mirror of https://github.com/aredn/aredn.git
Set tunnel weight to 1 and provide UI to change it. (#937)
This commit is contained in:
parent
eab36f4788
commit
272d53bab5
|
@ -3,6 +3,7 @@ if [ "$(/sbin/uci -c /etc/config.mesh -q get aredn.@tunnel[0])" != "tunnel" ]; t
|
||||||
/sbin/uci -c /etc/config.mesh -q add aredn tunnel
|
/sbin/uci -c /etc/config.mesh -q add aredn tunnel
|
||||||
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].maxclients=10
|
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].maxclients=10
|
||||||
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].maxservers=10
|
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].maxservers=10
|
||||||
|
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].weight=1
|
||||||
/sbin/uci -c /etc/config.mesh -q commit aredn
|
/sbin/uci -c /etc/config.mesh -q commit aredn
|
||||||
fi
|
fi
|
||||||
clients=$(/sbin/uci -c /etc/config.mesh -q get aredn.@tunnel[0].maxclients)
|
clients=$(/sbin/uci -c /etc/config.mesh -q get aredn.@tunnel[0].maxclients)
|
||||||
|
@ -22,3 +23,9 @@ config interface 'tun$tun'
|
||||||
__EOT__
|
__EOT__
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Default tunnel weight to 1 (perfect RF)
|
||||||
|
if [ "$(/sbin/uci -c /etc/config.mesh -q get aredn.@tunnel[0].weight)" = "" ]; then
|
||||||
|
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].weight=1
|
||||||
|
/sbin/uci -c /etc/config.mesh -q commit aredn
|
||||||
|
fi
|
||||||
|
|
|
@ -263,6 +263,14 @@ local settings = {
|
||||||
precallback = "restrictTunnelLimitToValidRange()",
|
precallback = "restrictTunnelLimitToValidRange()",
|
||||||
postcallback = "adjustTunnelInterfaceCount()"
|
postcallback = "adjustTunnelInterfaceCount()"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
category = "Tunnel Options",
|
||||||
|
key = "aredn.@tunnel[0].weight",
|
||||||
|
type = "string",
|
||||||
|
desc = "<b>Tunnel Weight</b> specifies the cost of using a tunnel. The higher the number, the less likely a tunnel is used.<br><br><small>aredn.@tunnel[0].weighy</small>",
|
||||||
|
default = "1",
|
||||||
|
needreboot= true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
category = "Tunnel Options",
|
category = "Tunnel Options",
|
||||||
key = "aredn.@tunnel[0].wanonly",
|
key = "aredn.@tunnel[0].wanonly",
|
||||||
|
|
Loading…
Reference in New Issue