aboutsummaryrefslogtreecommitdiffstats
path: root/net/stone
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2007-10-24 00:32:49 +0800
committernork <nork@FreeBSD.org>2007-10-24 00:32:49 +0800
commit604a3de874cf803580e9013fcebdd112d5a591f3 (patch)
tree927c5e3a84e1c769f3ea02f8597b15b99527c4cf /net/stone
parentd81d3eb6332fc946174708a299c2643bad66af23 (diff)
downloadfreebsd-ports-gnome-604a3de874cf803580e9013fcebdd112d5a591f3.tar.gz
freebsd-ports-gnome-604a3de874cf803580e9013fcebdd112d5a591f3.tar.zst
freebsd-ports-gnome-604a3de874cf803580e9013fcebdd112d5a591f3.zip
Original stone 2.3d has a bug in UDP->TCP translation that
only goes to error on BSD sendto(2) implementation. PR: ports/117391 Submitted by: Yoshihiko Sarumaru <mistral at imasy.or.jp> (maintainer) Obtained from: stone's CVS repository
Diffstat (limited to 'net/stone')
-rw-r--r--net/stone/Makefile1
-rw-r--r--net/stone/files/patch-stone.c58
2 files changed, 59 insertions, 0 deletions
diff --git a/net/stone/Makefile b/net/stone/Makefile
index 4c2f70e49de1..721cf2d5cb6f 100644
--- a/net/stone/Makefile
+++ b/net/stone/Makefile
@@ -7,6 +7,7 @@
PORTNAME= stone
PORTVERSION= 2.3d
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://www.gcd.org/sengoku/stone/
diff --git a/net/stone/files/patch-stone.c b/net/stone/files/patch-stone.c
new file mode 100644
index 000000000000..b3f71bc3efe6
--- /dev/null
+++ b/net/stone/files/patch-stone.c
@@ -0,0 +1,58 @@
+===================================================================
+RCS file: /cvsroot/stone/stone/stone.c,v
+retrieving revision 2.3.2.1
+retrieving revision 2.3.2.2
+diff -u -r2.3.2.1 -r2.3.2.2
+--- stone.c 2007/10/05 21:59:48 2.3.2.1
++++ stone.c 2007/10/22 03:07:17 2.3.2.2
+@@ -93,7 +93,7 @@
+ */
+ #define VERSION "2.3d"
+ static char *CVS_ID =
+-"@(#) $Id: stone.c,v 2.3.2.1 2007/10/05 21:59:48 hiroaki_sengoku Exp $";
++"@(#) $Id: stone.c,v 2.3.2.2 2007/10/22 03:07:17 hiroaki_sengoku Exp $";
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -3047,9 +3047,6 @@
+ time(&pair->clock);
+ if (p) p->clock = pair->clock;
+ pair->tx += len;
+- if ((pair->xhost->mode & XHostsMode_Dump) > 0
+- || ((pair->proto & proto_first_w) && Debug > 3))
+- message_buf(pair, len, "UDP");
+ return 0; /* success */
+ }
+
+@@ -3143,9 +3140,15 @@
+ if (ex != pair->b) ungetExBuf(ex);
+ if (pos >= len) { /* complete the packet */
+ complete:
+- if (!err) err = sendPairUDPbuf(stone, pair,
+- (char*)(buf+UDP_HEAD_LEN),
+- len-UDP_HEAD_LEN);
++ if (!err) {
++ err = sendPairUDPbuf(stone, pair, (char*)(buf+UDP_HEAD_LEN),
++ len-UDP_HEAD_LEN);
++ if (!err) {
++ if ((pair->xhost->mode & XHostsMode_Dump) > 0
++ || ((pair->proto & proto_first_w) && Debug > 3))
++ message_buf(pair, len, "tu");
++ }
++ }
+ if (cur != pair->b) ungetExBuf(cur);
+ cur = NULL;
+ }
+@@ -3810,7 +3813,11 @@
+ message(LOG_DEBUG, "%d TCP %d: connecting to TCP %d %s",
+ p1->stone->sd, p2->sd, p1->sd, addrport);
+ }
+- ret = connect(p1->sd, dst, dstlen);
++ if (p1->proto & proto_dgram) {
++ ret = 0; /* do nothing */
++ } else {
++ ret = connect(p1->sd, dst, dstlen);
++ }
+ if (ret < 0) {
+ #ifdef WINDOWS
+ errno = WSAGetLastError();