chiark
/
gitweb
/
~ian
/
userv-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
40f7555
)
Do not send ENDs. Do not send empty packets.
author
ian
<ian>
Sat, 25 Sep 1999 10:11:57 +0000
(10:11 +0000)
committer
ian
<ian>
Sat, 25 Sep 1999 10:11:57 +0000
(10:11 +0000)
ipif/udptunnel
patch
|
blob
|
history
diff --git
a/ipif/udptunnel
b/ipif/udptunnel
index 7160cca33a9c55d19a8cc78f2d45ba7e7cc9836a..1b5031c7d2f1f2e3406e0a4bbb21a8ddaec865ff 100755
(executable)
--- a/
ipif/udptunnel
+++ b/
ipif/udptunnel
@@
-215,7
+215,7
@@
for (;;) {
quit "tunnel endpoint closed by system";
}
while (($p= index($upbuf,"\300")) >= 0) {
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) {
warning("transmit error: $!");
} else {
if (!$upyet) {
@@
-233,6
+233,7
@@
for (;;) {
warning("got packet from incorrect peer $rsp_from");
next;
}
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) {
if (!defined($r= syswrite(DW,$downbuf,length $downbuf))) {
warning("tunnel endpoint write error: $!");
} elsif ($r != length $downbuf) {