ports/117391: update port: net/stone: bug fix for UDP->TCP translation
Yoshihiko Sarumaru
mistral at imasy.or.jp
Mon Oct 22 05:50:01 UTC 2007
>Number: 117391
>Category: ports
>Synopsis: update port: net/stone: bug fix for UDP->TCP translation
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 22 05:50:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Yoshihiko Sarumaru
>Release: FreeBSD 6.2-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD yumi.yamayuri.org 6.2-RELEASE-p3 FreeBSD 6.2-RELEASE-p3 #0: Tue Mar 27 01:55:53 JST 2007 root at yumi.yamayuri.org:/usr/obj/usr/src/sys/YUMI i386
>Description:
Original stone 2.3d has a bug in UDP->TCP translation that only
goes to error on BSD sendto(2) implementation.
A patch was captured from CVS repository.
>How-To-Repeat:
>Fix:
diff -urN stone-2.3d/Makefile stone/Makefile
--- stone-2.3d/Makefile Sun Oct 21 22:38:45 2007
+++ stone/Makefile Mon Oct 22 14:37:47 2007
@@ -7,6 +7,7 @@
PORTNAME= stone
PORTVERSION= 2.3d
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://www.gcd.org/sengoku/stone/
diff -urN stone-2.3d/files/patch-stone.c stone/files/patch-stone.c
--- stone-2.3d/files/patch-stone.c Thu Jan 1 09:00:00 1970
+++ stone/files/patch-stone.c Mon Oct 22 14:21:50 2007
@@ -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();
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list