On Thu, 4 Jul 2024 14:58:34 +1000 David Gibson <david(a)gibson.dropbear.id.au> wrote:For the approach we intend to use for handling UDP flows, we have some pretty specific requirements about how SO_REUSEADDR works with UDP sockets. Specifically SO_REUSEADDR allows multiple sockets with overlapping bind()s, and therefore there can be multiple sockets which are eligible to receive the same datagram. Which one will actually receive it is important to us. Add a test program which verifies things work the way we expect, which documents what those expectations are in the process. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- contrib/udp-behaviour/.gitignore | 1 + contrib/udp-behaviour/Makefile | 45 ++++ contrib/udp-behaviour/common.c | 66 ++++++ contrib/udp-behaviour/common.h | 47 ++++ contrib/udp-behaviour/reuseaddr-priority.c | 240 +++++++++++++++++++++ 5 files changed, 399 insertions(+)I reviewed these (10/11 and 11/11) a bit lightly, but they look sane to me. I just wonder: wouldn't it be better to have contrib/linux/udp-behaviour instead, so that it's consistent with the other stuff unter contrib/ (project names, kind of)? By the way, I reviewed everything else except for 9/11. That will take me a bit longer. And for the rest, I just have nits that I could also take care of on merge. -- Stefano