From 1d1209a4764e161ec232d2d76d7e698c15fd874c Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 25 Sep 1999 10:11:57 +0000 Subject: [PATCH] Do not send ENDs. Do not send empty packets. --- ipif/udptunnel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.30.2