Subject: bin/2955: timed bug
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dave@comp.vuw.ac.nz>
List: netbsd-bugs
Date: 11/20/1996 17:17:01
>Number: 2955
>Category: bin
>Synopsis: timed byte-order bug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 19 20:35:02 1996
>Last-Modified:
>Originator: Dave Sainty
>Organization:
>Release: 1.2
>Environment:
little-endian processor
System: NetBSD tequila.ext.nz 1.2 NetBSD 1.2 (TEQUILA) #7: Sun Nov 17 02:35:14 NZDT 1996 dave@tequila.ext.nz:/vol/usr/usr/src/NetBSD/NetBSD-current/src/sys/arch/i386/compile/TEQUILA i386
>Description:
timed network specification (inclusion or exclusion) is mapped to
interfaces. The network retrieval calls all return a result in
machine order. This is then compared to an address returned from
the interface in question in network-order.
>How-To-Repeat:
Run timed with -n or -i on a little-endian processor and get
confused about the "timed: no network usable" messages.
>Fix:
--- src/usr.sbin/timed/timed/timed.c.orig Sun Mar 31 11:55:13 1996
+++ src/usr.sbin/timed/timed/timed.c Wed Nov 20 17:03:21 1996
@@ -383,6 +383,7 @@
nt->net <<= 8;
if (0 == (nt->net & 0xff000000))
nt->net <<= 8;
+ nt->net = htonl(nt->net);
}
ifc.ifc_len = sizeof(buf);
ifc.ifc_buf = buf;
>Audit-Trail:
>Unformatted: