luci-mod-network: diagnostics: peg max traceroute hops to rpc timeout
authorJo-Philipp Wich <jo@mein.io>
Wed, 27 Apr 2022 18:43:05 +0000 (20:43 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 20 May 2022 18:23:26 +0000 (20:23 +0200)
commitf777bf78c11a6b7459ca007e976ffc5347197490
treee6712aa7bb3032c6fc62dd0da83aa2b04f2e3798
parent3886866ad6ebcf82709060688b0fa313da5abbad
luci-mod-network: diagnostics: peg max traceroute hops to rpc timeout

In the worst case, traceroute might take up to 30s to complete when tracing
a completely unreachable path, due to the default limit of 30 hops multiplied
by the per-hop deadline of 1 second (-w 1).

Limit the maximum amount of hops to the configured rpc execution timeout,
20 second by default, in order to avoid running into timed out rpc requests.

Fixes: #5782
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1ae142d7d11862b11a6e0cea06562875cc778ae7)
modules/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js