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)