mirror of https://github.com/aredn/aredn.git
Fix server vtun numbering (#1013)
This commit is contained in:
parent
188719c321
commit
99a12238c1
|
@ -539,7 +539,7 @@ if not nixio.fs.stat("/usr/sbin/vtund") then
|
||||||
maxclients = 0
|
maxclients = 0
|
||||||
maxservers = 0
|
maxservers = 0
|
||||||
end
|
end
|
||||||
for dev = 50, 50 + maxclients + maxservers
|
for dev = 50, 50 + maxclients + maxservers - 1
|
||||||
do
|
do
|
||||||
cfg.tun_devices_config = cfg.tun_devices_config ..
|
cfg.tun_devices_config = cfg.tun_devices_config ..
|
||||||
string.format("config interface 'tun%d'\n\toption ifname 'tun%d'\n\toption proto 'none'\n\n", dev, dev)
|
string.format("config interface 'tun%d'\n\toption ifname 'tun%d'\n\toption proto 'none'\n\n", dev, dev)
|
||||||
|
@ -938,7 +938,11 @@ if nixio.fs.access("/etc/config.mesh/olsrd", "r") then
|
||||||
-- add all the tunnel interfaces
|
-- add all the tunnel interfaces
|
||||||
if vtunclients + vtunservers + wgclients + wgservers > 0 then
|
if vtunclients + vtunservers + wgclients + wgservers > 0 then
|
||||||
of:write("config Interface\n")
|
of:write("config Interface\n")
|
||||||
for dev = 50, 50 + vtunclients + vtunservers
|
for dev = 50, 50 + vtunclients - 1
|
||||||
|
do
|
||||||
|
of:write("\tlist interface 'tun" .. dev .. "'\n")
|
||||||
|
end
|
||||||
|
for dev = 50 + maxclients, 50 + maxclients + vtunservers - 1
|
||||||
do
|
do
|
||||||
of:write("\tlist interface 'tun" .. dev .. "'\n")
|
of:write("\tlist interface 'tun" .. dev .. "'\n")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue