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

Fix MPTCP bandwidth when no data

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-10-19 16:18:36 +02:00
parent 9b91c5024e
commit 1c38d61897

View file

@ -114,14 +114,20 @@ function multipath_bandwidth()
res["total"][i][j]= tonumber(res["total"][i][j]) res["total"][i][j]= tonumber(res["total"][i][j])
end end
if j ==1 then if j ==1 then
if res[key][i][j] ~= nil then
res["total"][i][j] = res[key][i][j] res["total"][i][j] = res[key][i][j]
else else
res["total"][i][j] = 0
end
else
if res[key][i][j] ~= nil then
res["total"][i][j] = res["total"][i][j] + res[key][i][j] res["total"][i][j] = res["total"][i][j] + res[key][i][j]
end end
end end
end end
end end
end end
end
for i=1,60 do for i=1,60 do
for j=1,5 do for j=1,5 do
if "number"== type(res["total"][i][j]) then if "number"== type(res["total"][i][j]) then