[openssh-commits] [openssh] 01/01: Set SO_REUSEADDR in regression test netcat.

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Feb 8 12:42:29 AEDT 2018

This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit aee49b2a89b6b323c80dd3b431bd486e51f94c8c
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Thu Feb 8 12:36:22 2018 +1100

    Set SO_REUSEADDR in regression test netcat.
    Sometimes multiplex tests fail on Solaris with "netcat: local_listen:
    Address already in use" which is likely due to previous invocations
    leaving the port in TIME_WAIT.  Set SO_REUSEADDR (in addition to
    SO_REUSEPORT which is alread set on platforms that support it).  ok djm@
 regress/netcat.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/regress/netcat.c b/regress/netcat.c
index 98a08b1e..56bd09de 100644
--- a/regress/netcat.c
+++ b/regress/netcat.c
@@ -738,7 +738,12 @@ local_listen(char *host, char *port, struct addrinfo hints)
 		ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
 		if (ret == -1)
-			err(1, "setsockopt");
+			err(1, "setsockopt SO_REUSEPORT");
+		ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x));
+		if (ret == -1)
+			err(1, "setsockopt SO_REUSEADDR");

To stop receiving notification emails like this one, please contact
djm at mindrot.org.

More information about the openssh-commits mailing list