]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tc: netem: fix r parameter in Bernoulli loss model
authorAndrea Claudi <aclaudi@redhat.com>
Thu, 27 Jun 2019 14:47:45 +0000 (16:47 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 8 Jul 2019 15:17:22 +0000 (08:17 -0700)
commit90f0b587d8f77281e88f122855abe42e30c4a4f8
treecdd42a6f3493149191e1ab4d89084d310983a673
parentd791e75d74ffe212563c271f9ffa8a2e371770d5
tc: netem: fix r parameter in Bernoulli loss model

As the man page for tc netem states:

    To use the Bernoulli model, the only needed parameter is p while the
    others will be set to the default values r=1-p, 1-h=1 and 1-k=0.

However r parameter is erroneusly set to 1, and not to 1-p.
Fix this using the same approach of the 4-state loss model.

Fixes: 3c7950af598be ("netem: add support for 4 state and GE loss model")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/q_netem.c