Convert nets specified with -i/-n to network byte order.

PR:		3906, 3801
Submitted by:	Bob Willcox <bob@luke.pmr.com>, Hiroya Tsubakimoto
This commit is contained in:
Jonathan Lemon 1997-08-21 19:53:04 +00:00
parent 7d204e555f
commit 5b49d899ec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28547

View File

@ -42,7 +42,7 @@ static char sccsid[] = "@(#)timed.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
#ifdef sgi
#ident "$Revision: 1.2 $"
#ident "$Revision: 1.3 $"
#endif /* sgi */
#define TSPTYPES
@ -452,7 +452,7 @@ main(argc, argv)
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)