1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00

IN_CLASS*() macros assume host order and s_addr is network byte

order, so we must convert them to host order.
This commit is contained in:
Paul Saab 2000-09-20 18:16:20 +00:00
parent 474afc4230
commit 2ead0fa6d7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66134

View File

@ -201,9 +201,9 @@ bootp(sock, flag)
bcopy(rbuf.rbootp.bp_file, bootfile, sizeof(bootfile));
bootfile[sizeof(bootfile) - 1] = '\0';
if (IN_CLASSA(myip.s_addr))
if (IN_CLASSA(ntohl(myip.s_addr)))
nmask = htonl(IN_CLASSA_NET);
else if (IN_CLASSB(myip.s_addr))
else if (IN_CLASSB(ntohl(myip.s_addr)))
nmask = htonl(IN_CLASSB_NET);
else
nmask = htonl(IN_CLASSC_NET);