<div dir="ltr"><div>Hi team,</div><div><br></div><div>We were trying to generate UDP traffic using the <span style="font-family:monospace">openssl rand</span> command over a DTLS connection in Linux network namespaces.<br></div><div><br></div><div>After generating certificates,<br></div><div>1. we set up the dtls server on the server namespace using the following command,<br></div><div><span style="font-family:monospace">    openssl s_server -dtls -key server.key -cert server.crt -accept 4433</span></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial,sans-serif">2. We use the following command to generate a UDP flow for 5s on the client namespace,</font></div><div><span style="font-family:monospace">    timeout 5s bash -c "while true; do openssl rand -hex 1024;done" | openssl s_client -dtls -connect <a href="http://10.0.2.2:4433/" target="_blank">10.0.2.2:4433</a> -cert client.crt -key client.key</span></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial,sans-serif">While executing the above, we notice that the DTLS handshake is done successfully, but the server does not receive application data; instead, we encounter the following error,</font></div><div><font face="arial,sans-serif"><br></font></div><div><span style="font-family:monospace"><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:monospace">write:errno=90<br>803B1C61FC7E0000:error:80000020:system library:file_ctrl:Broken pipe:../crypto/bio/bss_file.c:326:calling fflush()<br>803B1C61FC7E0000:error:10080002:BIO routines:file_ctrl:system lib:../crypto/bio/bss_file.c:328:</span></div></blockquote><div><br></div><div>However, the commands work while generating TCP traffic over a TLS connection.<br></div><div><br></div><div>Our openssl configurations are,</div><div><span style="font-family:monospace">OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)<br>built on: Mon Feb  6 17:57:17 2023 UTC<br>platform: debian-amd64<br>options:  bn(64,64)<br>compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -ffile-prefix-map=/build/openssl-hnAO60/openssl-3.0.2=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_TLS_SECURITY_LEVEL=2 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2<br>OPENSSLDIR: "/usr/lib/ssl"<br>ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-3"<br>MODULESDIR: "/usr/lib/x86_64-linux-gnu/ossl-modules"<br>Seeding source: os-specific<br>CPUINFO: OPENSSL_ia32cap=0x7ffaf3ffffebffff:0x405f5ef2bf67eb</span></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial,sans-serif">Please help us figure out the solution.<br></font></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial,sans-serif">Regards,</font></div><div><font face="arial,sans-serif">Kathan Vakharia and Team</font></div></div>