diff options
author | ian <ian> | 1999-09-25 10:11:57 +0000 |
---|---|---|
committer | ian <ian> | 1999-09-25 10:11:57 +0000 |
commit | 1d1209a4764e161ec232d2d76d7e698c15fd874c (patch) | |
tree | a1a186153f51119b3fa35fa8750ab637447a20b7 /ipif | |
parent | 40f7555063d5bd252bdde051baa13d082e17b610 (diff) | |
download | userv-utils-1d1209a4764e161ec232d2d76d7e698c15fd874c.tar.gz |
Do not send ENDs. Do not send empty packets.
Diffstat (limited to 'ipif')
-rwxr-xr-x | ipif/udptunnel | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipif/udptunnel b/ipif/udptunnel index 7160cca..1b5031c 100755 --- a/ipif/udptunnel +++ b/ipif/udptunnel @@ -215,7 +215,7 @@ for (;;) { quit "tunnel endpoint closed by system"; } while (($p= index($upbuf,"\300")) >= 0) { - if (!defined(send L,substr($upbuf,0,$p+1),0,$rs)) { + if ($p && !defined(send L,substr($upbuf,0,$p),0,$rs)) { warning("transmit error: $!"); } else { if (!$upyet) { @@ -233,6 +233,7 @@ for (;;) { warning("got packet from incorrect peer $rsp_from"); next; } + $downbuf= "\300".$downbuf."\300"; if (!defined($r= syswrite(DW,$downbuf,length $downbuf))) { warning("tunnel endpoint write error: $!"); } elsif ($r != length $downbuf) { |