DTLSv1_listen unable to accept second client in a docker container

I’m experiencing an issue with OpenSSL/DTLS server.

Environment: docker container based on CentOs7

OpenSSL version: OpenSSL-1.1.1d

A DTLS server (non-blocking) using DTLSv1_Listen having a UDP socket with SO_REUSEADDR is unable to accept a second client connection when it has already been accepted a client connection and serving it.

When the first client has finished, the second client connection is accepted.

I have used the dtls_udp_echo.c (taken from http://web.archive.org/web/20150617012520/http://sctp.fh-muenster.de/dtls-samples.html ) to carry out the test and reproduce the issue.

The test application has been compiled and executed within a docker container, having CentOS7 as base image, but the behaviour has been noticed with other base images OS too (e.g. Redhat, Ubuntu, Debian, SLES). The same application running on a bare metal works without any issue.

Is there any known compatibility issue between Docker and OpenSSL/DTLS?

Is there any specific configuration to be done to overcome this issue?

Best Regards

I’ve fixed the issue by commenting the SO_REUSEPORT in the dtls_udp_echo.c as indicated at the link https://github.com/openssl/openssl/issues/6934.