From owner-freebsd-bugs Thu Jun 19 11:30:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA10131 for bugs-outgoing; Thu, 19 Jun 1997 11:30:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA10124; Thu, 19 Jun 1997 11:30:02 -0700 (PDT) Resent-Date: Thu, 19 Jun 1997 11:30:02 -0700 (PDT) Resent-Message-Id: <199706191830.LAA10124@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, bob@luke.pmr.com Received: from luke.pmr.com (luke.pmr.com [206.224.65.132]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA10059 for ; Thu, 19 Jun 1997 11:28:50 -0700 (PDT) Received: (from bob@localhost) by luke.pmr.com (8.8.5/8.7.3) id NAA16503; Thu, 19 Jun 1997 13:28:40 -0500 (CDT) Message-Id: <199706191828.NAA16503@luke.pmr.com> Date: Thu, 19 Jun 1997 13:28:40 -0500 (CDT) From: Bob Willcox Reply-To: bob@luke.pmr.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/3906: Bug in timed with -n & -i flags Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3906 >Category: bin >Synopsis: timed mishandles network numbers >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 19 11:30:01 PDT 1997 >Last-Modified: >Originator: Bob Willcox >Organization: Power Micro Research >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: Running timed on multi-homed host >Description: Timed fails to convert network numbers specified via the -n or -i flags into network byte order and therefore does not find these networks. >How-To-Repeat: Execute timed with a valid network specification for the -n flag. It will not find the network and fail to start. >Fix: Here is a patch: Index: usr.sbin/timed/timed/timed.c =================================================================== RCS file: /usr/cvs/FreeBSD/src/usr.sbin/timed/timed/timed.c,v retrieving revision 1.2 diff -u -r1.2 timed.c --- timed.c 1995/05/15 09:56:49 1.2 +++ timed.c 1997/06/19 04:45:34 @@ -452,7 +452,7 @@ ntp->dest_addr.sin_port = port; for (nt = nets; nt; nt = nt->next) { - if (ntp->net.s_addr == nt->net) + if (ntp->net.s_addr == htonl(nt->net)) break; } if (nflag && !nt || iflag && nt) >Audit-Trail: >Unformatted: