From nobody  Fri Jun  6 03:42:05 1997
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.5/8.8.5) id DAA12567;
          Fri, 6 Jun 1997 03:42:05 -0700 (PDT)
Message-Id: <199706061042.DAA12567@hub.freebsd.org>
Date: Fri, 6 Jun 1997 03:42:05 -0700 (PDT)
From: zorac@4000do.co.jp
To: freebsd-gnats-submit@freebsd.org
Subject: 'timed' don't work with option '-n'
X-Send-Pr-Version: www-1.0

>Number:         3801
>Category:       bin
>Synopsis:       'timed' don't work with option '-n'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun  6 03:50:00 PDT 1997
>Closed-Date:    Thu Aug 21 12:58:06 PDT 1997
>Last-Modified:  Thu Aug 21 12:58:45 PDT 1997
>Originator:     Hiroya Tsubakimoto
>Release:        2.1-STABLE
>Organization:
4000Do Co.,LTD.
>Environment:
FreeBSD s2.dev.4000do.co.jp 2.1-STABLE FreeBSD 2.1-STABLE #0: Tue May 20 07:16:48 JST 1997     zorac
@s2.c4000do.co.kyoto-inet.or.jp:/usr/src/sys/compile/HOME  i386
>Description:
The 'timed' daemon don't work with option '-n' or '-i'.
network argument (in /etc/networks) was not accepted.

>How-To-Repeat:
# timed -n mynet         <--- 'mynet' is network name in /etc/networks
timed: unknown net mynet

>Fix:
following patch:
*** timed.c     Fri Jun  6 17:56:05 1997
--- timed.c.patch       Thu Jun  5 12:17:30 1997
***************
*** 452,458 ****
                ntp->dest_addr.sin_port = port;

                for (nt = nets; nt; nt = nt->next) {
!                       if (ntp->net.s_addr == nt->net)
                                break;
                }
                if (nflag && !nt || iflag && nt)
--- 452,458 ----
                ntp->dest_addr.sin_port = port;

                for (nt = nets; nt; nt = nt->next) {
!                       if (ntohl(ntp->net.s_addr) == nt->net)
                                break;
                }
                if (nflag && !nt || iflag && nt)

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jlemon 
State-Changed-When: Thu Aug 21 12:58:06 PDT 1997 
State-Changed-Why:  

Similar fix applied, see PR 3906. 
>Unformatted:
