Skip to content

Commit

Permalink
verify_qdisc: Use a random IFB name to prevent collisions
Browse files Browse the repository at this point in the history
With parallel startup of SQM instances, always using the same name for
testing if an IFB works leads to collisions and failures. Instead, use a
random IFB name each time, which should hopefully be enough to avoid
collisions.

Fixes tohojo#120.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
  • Loading branch information
tohojo committed May 23, 2020
1 parent a0626e0 commit 0dcd5f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,11 @@ verify_qdisc() {
local args
local IFB_MTU
local found
local randnum
qdisc=$1
supported="$2"
ifb=TMP_IFB_4_SQM
randnum=$(tr -cd 0-9a-f < /dev/urandom | head -c 5)
ifb=SQM_IFB_$randnum
root_string="root" # this works for most qdiscs
args=""
IFB_MTU=1514
Expand Down

0 comments on commit 0dcd5f5

Please sign in to comment.