Date: Sat, 3 Jan 1998 11:50:01 -0800 (PST) From: Steve Price <sprice@hiwaay.net> To: freebsd-bugs Subject: Re: bin/5419: timed rejects valid networks with -n Message-ID: <199801031950.LAA29350@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5419; it has been noted by GNATS. From: Steve Price <sprice@hiwaay.net> To: traister@mojozone.org Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/5419: timed rejects valid networks with -n Date: Sat, 03 Jan 1998 13:50:02 -0600 Joe Traister wrote: > > >Fix: > > --- timed.c.dist Fri Jan 2 22:14:01 1998 > +++ timed.c Fri Jan 2 22:14:25 1998 > @@ -364,7 +364,7 @@ > nentp = getnetbyaddr(nt->net, AF_INET); > } > if (nentp != 0) { > - nt->net = nentp->n_net; > + nt->net = htonl(nentp->n_net); > } else if (nt->net == INADDR_NONE) { > fprintf(stderr, "timed: unknown net %s\n", nt->name); > exit(1); I am no timed(8) expert. In fact, I have never used it. Just from looking at the code it appears that if the above fix is appropriate then it should also be supplemented with the following patch. I'm just guessing here, so don't shoot me if I'm wrong. :) Steve @@ -420,7 +420,7 @@ ntp->dest_addr.sin_port = port; for (nt = nets; nt; nt = nt->next) { - if (ntp->net.s_addr == htonl(nt->net)) + if (ntp->net.s_addr == nt->net) break; } if ((nflag && !nt) || (iflag && nt))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801031950.LAA29350>