]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEV: udp: implement pseudo-random reordering/loss
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Mar 2022 16:36:53 +0000 (17:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Mar 2022 16:54:04 +0000 (17:54 +0100)
commite7a7fb439050b22f8a292f61893a95d2bb954459
treeef47c9463d6ad64394eee7de6b5b7a448520f26a
parentc927137785a4667be26986a5f7a080037db7441a
DEV: udp: implement pseudo-random reordering/loss

By passing a 3rd argument it's now possible to set a randomness level
according to which received packets will be replaced by one of the 20
previous ones. This happens in both directions and the buffer is common
so that it's possible to receive responses on requests and conversely,
which adds to the perturbation. E.g:

    ./dev/udp/udp-perturb 127.0.0.4:9443 127.0.0.4:8443 10

This will add 10% randomness on forwarded packets between these two
ports.
dev/udp/udp-perturb.c