Date: Thu, 19 Jun 1997 13:28:40 -0500 (CDT) From: Bob Willcox <bob@luke.pmr.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/3906: Bug in timed with -n & -i flags Message-ID: <199706191828.NAA16503@luke.pmr.com> Resent-Message-ID: <199706191830.LAA10124@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706191828.NAA16503>