Re: Call for testing: OpenSSH 6.8

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Mon, 23 Feb 2015, Corinna Vinschen wrote:

> leaves the ports 3301/3302 in TIME_WAIT state (as is 4242 from some
> earlier test).  Here are the relevant excerpts from ps -e and (Windows)
> netstat output.  The first group is the output prior to the above test:

[snip]

> This may well be a problem local to Windows.  Btw., the large number of
> AF_INET sockets is a result of the way how Cygwin implements AF_LOCAL
> sockets:  They are emulated by local AF_INET sockets since WIndows
> doesn't know the concept of AF_LOCAL sockets.

Does CYGWIN implement setsockopt(s, SOL_SOCKET, SO_REUSEADDR, ...)?
We set this for (AFAIK) all forwarding listeners to prevent TIME_WAIT
collisions.

> Note that there are still sleep processes running.  So on a hunch I just
> added a `sleep 30' between the two tests and, lo and behold, the
> forwarding.sh test completes successfully every time:

IMO it's probably a simple race condition rather than a TCP thing, and
the test before the "transfer over chained unix domain socket" one does
look like it fails to wait for the backgrounded ssh to finish (the wait
doesn't wait for the background ssh, but the one following it).

Does the following help?

Index: forwarding.sh
===================================================================
RCS file: /cvs/src/regress/usr.bin/ssh/forwarding.sh,v
retrieving revision 1.13
diff -u -p -r1.13 forwarding.sh
--- forwarding.sh	21 Feb 2015 20:51:02 -0000	1.13
+++ forwarding.sh	23 Feb 2015 17:25:40 -0000
@@ -8,6 +8,9 @@ start_sshd
 base=33
 last=$PORT
 fwd=""
+CTL=$OBJ/ctl-sock
+rm -f $CTL
+
 for j in 0 1 2; do
 	for i in 0 1 2; do
 		a=$base$j$i
@@ -107,7 +110,7 @@ echo "LocalForward ${base}01 127.0.0.1:$
 echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> $OBJ/ssh_config
 for p in 1 2; do
 	trace "config file: start forwarding, fork to background"
-	${SSH} -$p -F $OBJ/ssh_config -f somehost sleep 10
+	${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f somehost sleep 10
 
 	trace "config file: transfer over forwarded channels and check result"
 	${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \
@@ -115,7 +118,7 @@ for p in 1 2; do
 	test -s ${COPY}		|| fail "failed copy of ${DATA}"
 	cmp ${DATA} ${COPY}	|| fail "corrupted copy of ${DATA}"
 
-	wait
+	${SSH} -S $CTL -O exit somehost
 done
 
 for p in 2; do
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux