wok-6.x rev 18102

ppp/pppnc: udp instead of tcp
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jun 01 10:13:14 2015 +0200 (2015-06-01)
parents 31fd89019d06
children eafc174e124b
files ppp/stuff/pppnc-server
line diff
     1.1 --- a/ppp/stuff/pppnc-server	Mon Jun 01 10:08:34 2015 +0200
     1.2 +++ b/ppp/stuff/pppnc-server	Mon Jun 01 10:13:14 2015 +0200
     1.3 @@ -7,7 +7,7 @@
     1.4  case "$0" in
     1.5  *server) # Usage: pppnc-server [port] [localip:remoteip]
     1.6  	n=10.$(($$%256)).$(($$/256))
     1.7 -	exec $ppp ${2:-$n.1:$n.2} passive proxyarp pty "nc -lp ${1:-$port}"
     1.8 +	exec $ppp ${2:-$n.1:$n.2} passive proxyarp pty "nc -ulp ${1:-$port}"
     1.9  esac
    1.10  
    1.11  [ -z "$1" ] && echo "Usage: $0 serverip [port] [routes]" && exit 1
    1.12 @@ -18,6 +18,6 @@
    1.13  done > $ipupd/pppnc$$
    1.14  [ "$3" ] && echo "route add $extra" >> $ipupd/pppnc$$
    1.15  chmod +x $ipupd/pppnc$$
    1.16 -$ppp noipdefault pty "nc $1 ${2:-$port}" ipparam pppnc$$
    1.17 +$ppp noipdefault pty "nc -u $1 ${2:-$port}" ipparam pppnc$$
    1.18  [ "$3" ] && route del $extra
    1.19  rm -f $ipupd/pppnc$$