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>
Wed, 27 Apr 2022 18:43:05 +0000 (20:43 +0200)
commit1ae142d7d11862b11a6e0cea06562875cc778ae7
treeb7fc97375bc25e402f160dee9f8edca2e954faf2
parent2f80fe3767207e2dbb8c5286603f49808b66a60d
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>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js