mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 11:31:51 +00:00
Fix iperf
This commit is contained in:
parent
4ba73e9908
commit
470b839c61
2 changed files with 11 additions and 12 deletions
|
@ -15,10 +15,9 @@ function run_test(server,proto,mode,updown,omit,parallel,transmit,bitrate)
|
|||
local iperf
|
||||
local addr = uci:get("iperf",server,"host")
|
||||
local ports = uci:get("iperf",server,"ports")
|
||||
if proto == "ipv4" then
|
||||
local ipv = 4
|
||||
else
|
||||
local ipv = 6
|
||||
local ipv = "4"
|
||||
if proto == "ipv6" then
|
||||
local ipv = "6"
|
||||
end
|
||||
|
||||
local t={}
|
||||
|
@ -28,15 +27,15 @@ function run_test(server,proto,mode,updown,omit,parallel,transmit,bitrate)
|
|||
local port = t[ math.random( #t ) ]
|
||||
if mode == "tcp" then
|
||||
if updown == "upload" then
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -t %i -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -t %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
||||
else
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -R -t %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -R -t %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
||||
end
|
||||
else
|
||||
if updown == "upload" then
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
||||
else
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -R -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
||||
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -R -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
||||
end
|
||||
end
|
||||
if iperf then
|
||||
|
|
|
@ -123,10 +123,10 @@
|
|||
<label class="cbi-value-title"><%:Target bitrate (Mbits/s)%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="bitrate" data-type="uinteger" type="text" class="cbi-input-text" value="0"/>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:0 for unlimited. Need to be limited for UDP test%>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:0 for unlimited. Need to be limited for UDP test%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
|
|
Loading…
Reference in a new issue