From b579f27765206f78373d70d2c0adde464124fb2e Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Tue, 22 Nov 2011 13:57:46 +0100 Subject: [PATCH] minor corrections to docu and test.sh resulting from local compilation on Openmoko SHR --- CHANGES | 3 +++ doc/socat-tun.html | 12 ++++++++---- test.sh | 11 ++++++++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 4a16d2e..0aadf93 100644 --- a/CHANGES +++ b/CHANGES @@ -81,6 +81,9 @@ porting: corrections for OpenEmbedded, especially termios SHIFT values and ISPEED/OSPEED. Thanks to John Faith for providing the patch + minor corrections to docu and test.sh resulting from local compilation + on Openmoko SHR + ####################### V 1.7.1.3: security: diff --git a/doc/socat-tun.html b/doc/socat-tun.html index 28c302b..9dedad7 100644 --- a/doc/socat-tun.html +++ b/doc/socat-tun.html @@ -93,8 +93,12 @@ reasons: you are not on Linux or are using an older version of socat.

Missing kernel support

An error message like:

... E open("/dev/net/tun", 02, 0666): No such file or directory
-

indicates that your kernel does not have TUN/TAP support compiled -in. Rebuild your kernel with the appropriate configuration (probably under +

indicates that your kernel either needs to load the tun module or does not + have TUN/TAP support compiled in. Try to load the module:

+modprobe tun +

and check + for /dev/net/tun. If that does not succeed you need to + rebuild your kernel with the appropriate configuration (probably under Device driver / Network device support / Network device / Universal TUN/TAP).

@@ -140,7 +144,7 @@ transfer.

Linux TUN/TAP support was added to socat in version 1.6.0.

-

This document was last modified in April 2009.

+

This document was last modified in February 2010.

More info about socat TUN/TAP support

@@ -157,7 +161,7 @@ Linux TUN/TAP support was added to socat in version 1.6.0.

TUN/TAP on Wikipedia

-Copyright: Gerhard Rieger 2007-2009
+Copyright: Gerhard Rieger 2007-2010
License: GNU Free Documentation License (FDL)

diff --git a/test.sh b/test.sh index 12e447c..11c9a62 100755 --- a/test.sh +++ b/test.sh @@ -1946,7 +1946,7 @@ waittcp6port () { [ "$timeout" ] || timeout=5 while [ $timeout -gt 0 ]; do case "$UNAME" in - Linux) l=$(netstat -an |grep -E '^tcp6? .* [0-9a-f:]*:'$port' .* LISTEN') ;; + Linux) l=$(netstat -an |grep -E '^tcp6? .* [0-9a-f:%]*:'$port' .* LISTEN') ;; FreeBSD) l=$(netstat -an |egrep -i 'tcp(6|46) .*[0-9*][:.]'$port' .* listen') ;; NetBSD) l=$(netstat -an |grep '^tcp6 .*[0-9*]\.'$port' [ ]* \*\.\*') ;; OpenBSD) l=$(netstat -an |grep -i 'tcp6 .*[0-9*][:.]'$port' .* listen') ;; @@ -1976,7 +1976,7 @@ waitudp6port () { [ "$timeout" ] || timeout=5 while [ $timeout -gt 0 ]; do case "$UNAME" in - Linux) l=$(netstat -an |grep -E '^udp6? .* .*[0-9*:]:'$port' [ ]*:::\*') ;; + Linux) l=$(netstat -an |grep -E '^udp6? .* .*[0-9*:%]:'$port' [ ]*:::\*') ;; FreeBSD) l=$(netstat -an |egrep '^udp(6|46) .*[0-9*]\.'$port' .* \*\.\*') ;; NetBSD) l=$(netstat -an |grep '^udp6 .* \*\.'$port' [ ]* \*\.\*') ;; OpenBSD) l=$(netstat -an |grep '^udp6 .*[0-9*]\.'$port' [ ]* \*\.\*') ;; @@ -8242,7 +8242,7 @@ CMD1="$SOCAT $opts -u - UDP4-SENDTO:$TUNNET.2:$PORT" #CMD="$SOCAT $opts -u -L $tl TUN,ifaddr=$TUNNET.1,netmask=255.255.255.0,iff-up=1 -" CMD="$SOCAT $opts -u -L $tl TUN:$TUNNET.1/24,iff-up=1 -" printf "test $F_n $TEST... " $N -$CMD 2>"${te}" |tail --bytes=$dalen >"${tf}" & +$CMD 2>"${te}" |tail -c $dalen >"${tf}" & sleep 1 echo "$da" |$CMD1 2>"${te}1" sleep 1 @@ -9275,6 +9275,11 @@ elif [ "$KEYW" = "TCP6" -o "$KEYW" = "UDP6" -o "$KEYW" = "SCTP6" ] && \ ! runsip6 >/dev/null; then $PRINTF "test $F_n $TEST... ${YELLOW}IP6 not available${NORMAL}\n" $N numCANT=$((numCANT+1)) +elif [ "$KEYW" = "SCTP4" ] && ! runssctp4 "$((PORT))"; then + $PRINTF "test $F_n $TEST... ${YELLOW}$KEYW not available${NORMAL}\n" $N +elif [ "$KEYW" = "SCTP6" ] && ! runssctp4 "$((PORT))"; then + #!!! branch not reached - caught above! + $PRINTF "test $F_n $TEST... ${YELLOW}$KEYW not available${NORMAL}\n" $N else tf="$td/test$N.stdout" te="$td/test$N.stderr"