minor corrections to docu and test.sh resulting from local compilation on Openmoko SHR

This commit is contained in:
Gerhard Rieger 2011-11-22 13:57:46 +01:00
parent d2fab02571
commit b579f27765
3 changed files with 19 additions and 7 deletions

View file

@ -81,6 +81,9 @@ porting:
corrections for OpenEmbedded, especially termios SHIFT values and corrections for OpenEmbedded, especially termios SHIFT values and
ISPEED/OSPEED. Thanks to John Faith for providing the patch 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: ####################### V 1.7.1.3:
security: security:

View file

@ -93,8 +93,12 @@ reasons: you are not on Linux or are using an older version of socat.
<h3>Missing kernel support</h3> <h3>Missing kernel support</h3>
<p>An error message like:</p> <p>An error message like:</p>
<table border="1" bgcolor="#e08080"><tr><td><tt>... E open("/dev/net/tun", 02, 0666): No such file or directory</tt></td></tr></table> <table border="1" bgcolor="#e08080"><tr><td><tt>... E open("/dev/net/tun", 02, 0666): No such file or directory</tt></td></tr></table>
<p>indicates that your kernel does not have TUN/TAP support compiled <p>indicates that your kernel either needs to load the tun module or does not
in. Rebuild your kernel with the appropriate configuration (probably under have TUN/TAP support compiled in. Try to load the module:</p>
<span class="frame"><span class="shell">modprobe tun</span></span>
<p>and check
for /dev/net/tun. If that does not succeed you need to
rebuild your kernel with the appropriate configuration (probably under
<b>Device driver / Network device support / Network device / Universal TUN/TAP</b>). <b>Device driver / Network device support / Network device / Universal TUN/TAP</b>).
</p> </p>
@ -140,7 +144,7 @@ transfer.<p>
<p> <p>
Linux TUN/TAP support was added to socat in version 1.6.0.</p> Linux TUN/TAP support was added to socat in version 1.6.0.</p>
<p>This document was last modified in April 2009.</p> <p>This document was last modified in February 2010.</p>
<h2>More info about socat TUN/TAP support</h2> <h2>More info about socat TUN/TAP support</h2>
@ -157,7 +161,7 @@ Linux TUN/TAP support was added to socat in version 1.6.0.</p>
<a href="http://en.wikipedia.org/wiki/TUN/TAP">TUN/TAP on Wikipedia</a><br> <a href="http://en.wikipedia.org/wiki/TUN/TAP">TUN/TAP on Wikipedia</a><br>
<p> <p>
<small>Copyright: Gerhard Rieger 2007-2009</small><br> <small>Copyright: Gerhard Rieger 2007-2010</small><br>
<small>License: <a href="http://www.fsf.org/licensing/licenses/fdl.html">GNU Free Documentation License (FDL)</a></small> <small>License: <a href="http://www.fsf.org/licensing/licenses/fdl.html">GNU Free Documentation License (FDL)</a></small>
</p> </p>

11
test.sh
View file

@ -1946,7 +1946,7 @@ waittcp6port () {
[ "$timeout" ] || timeout=5 [ "$timeout" ] || timeout=5
while [ $timeout -gt 0 ]; do while [ $timeout -gt 0 ]; do
case "$UNAME" in 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') ;; FreeBSD) l=$(netstat -an |egrep -i 'tcp(6|46) .*[0-9*][:.]'$port' .* listen') ;;
NetBSD) l=$(netstat -an |grep '^tcp6 .*[0-9*]\.'$port' [ ]* \*\.\*') ;; NetBSD) l=$(netstat -an |grep '^tcp6 .*[0-9*]\.'$port' [ ]* \*\.\*') ;;
OpenBSD) l=$(netstat -an |grep -i 'tcp6 .*[0-9*][:.]'$port' .* listen') ;; OpenBSD) l=$(netstat -an |grep -i 'tcp6 .*[0-9*][:.]'$port' .* listen') ;;
@ -1976,7 +1976,7 @@ waitudp6port () {
[ "$timeout" ] || timeout=5 [ "$timeout" ] || timeout=5
while [ $timeout -gt 0 ]; do while [ $timeout -gt 0 ]; do
case "$UNAME" in 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' .* \*\.\*') ;; FreeBSD) l=$(netstat -an |egrep '^udp(6|46) .*[0-9*]\.'$port' .* \*\.\*') ;;
NetBSD) l=$(netstat -an |grep '^udp6 .* \*\.'$port' [ ]* \*\.\*') ;; NetBSD) l=$(netstat -an |grep '^udp6 .* \*\.'$port' [ ]* \*\.\*') ;;
OpenBSD) l=$(netstat -an |grep '^udp6 .*[0-9*]\.'$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,ifaddr=$TUNNET.1,netmask=255.255.255.0,iff-up=1 -"
CMD="$SOCAT $opts -u -L $tl TUN:$TUNNET.1/24,iff-up=1 -" CMD="$SOCAT $opts -u -L $tl TUN:$TUNNET.1/24,iff-up=1 -"
printf "test $F_n $TEST... " $N printf "test $F_n $TEST... " $N
$CMD 2>"${te}" |tail --bytes=$dalen >"${tf}" & $CMD 2>"${te}" |tail -c $dalen >"${tf}" &
sleep 1 sleep 1
echo "$da" |$CMD1 2>"${te}1" echo "$da" |$CMD1 2>"${te}1"
sleep 1 sleep 1
@ -9275,6 +9275,11 @@ elif [ "$KEYW" = "TCP6" -o "$KEYW" = "UDP6" -o "$KEYW" = "SCTP6" ] && \
! runsip6 >/dev/null; then ! runsip6 >/dev/null; then
$PRINTF "test $F_n $TEST... ${YELLOW}IP6 not available${NORMAL}\n" $N $PRINTF "test $F_n $TEST... ${YELLOW}IP6 not available${NORMAL}\n" $N
numCANT=$((numCANT+1)) 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 else
tf="$td/test$N.stdout" tf="$td/test$N.stdout"
te="$td/test$N.stderr" te="$td/test$N.stderr"