BUG/MINOR: mux_quic: fix max stream ID reuse estimation
The following patch adjusts QUIC mux avail_streams() to ensure maximum
stream ID is never exceeded.
commit
143d0034c912f1490812b6302f0dffb37f3ec02d
BUG/MINOR: mux_quic: limit avail_streams() to 2^62
However, the calcul is incorrect, as <next_bidi_l> member value is set
to the next ID available, not the last one in use. Also, when the last
stream is closed, it will be greater than QCS_ID_MAX_STRM_CL_BIDI,
resulting in a substraction wrapping.
Fix this by using the simplest approach. Return value of avail_streams()
is only reduced if either the maximum stream ID limit is already
exceeded, or there is only a single stream still usable. In other cases,
return value is left as is.
Note that this bug is unlikely to have any impact as the maximum stream
ID is a very large value.
This should be backported up to 3.3.