mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 14:39:37 +00:00
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:
parent
7d204e555f
commit
5b49d899ec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28547
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user