Subject: pkg/17220: ttcp 64 big-endian 'connection refused'
To: None <gnats-bugs@gnats.netbsd.org>
From: None <petrov@netbsd.org>
List: netbsd-bugs
Date: 06/11/2002 13:07:30
>Number: 17220
>Category: pkg
>Synopsis: ttcp 64 big-endian 'connection refused'
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 11 13:08:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Andrey Petrov
>Release: 1.6A
>Organization:
>Environment:
NetBSD muppet 1.6A NetBSD 1.6A (U2) #14: Tue Jun 11 11:02:47 PDT 2002 and@muppet:/work/16A/sys/arch/sparc64/compile/U2 sparc64
>Description:
Start ttcp in receive mode on target machine and see transmitter failed:
ttcp incorrectly copies target sin_addr on sparc64 (or other 64 big endian
platform), this causes 'connection refused' error on transmitter.
Receiver's ip address can be used as a work-around.
Provided patch assumes that
ansi.h:46:typedef __uint32_t __in_addr_t; /* IP(v4) address */
is always true.
>How-To-Repeat:
Start ttcp in receive mode on target machine and see transmitter failed:
ttcp -t -s flipper
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001 tcp -> flipper
ttcp-t: socket
ttcp-t: connect: Connection refused
errno=61
>Fix:
--- ttcp.c~ Fri May 17 12:30:58 2002
+++ ttcp.c Tue Jun 11 12:40:50 2002
@@ -152,7 +152,7 @@ main(argc,argv)
int argc;
char **argv;
{
- unsigned long addr_tmp;
+ unsigned int addr_tmp;
int c;
if (argc < 2) goto usage;
>Release-Note:
>Audit-Trail:
>Unformatted: