Page MenuHomeFreeBSD

D8740.1775550099.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D8740.1775550099.diff

Index: head/lib/libstand/bootp.c
===================================================================
--- head/lib/libstand/bootp.c
+++ head/lib/libstand/bootp.c
@@ -62,8 +62,6 @@
struct in_addr servip;
-static n_long nmask, smask;
-
static time_t bot;
static char vm_rfc1048[4] = VM_RFC1048;
@@ -223,30 +221,6 @@
bcopy(rbuf.rbootp.bp_file, bootfile, sizeof(bootfile));
bootfile[sizeof(bootfile) - 1] = '\0';
- if (IN_CLASSA(ntohl(myip.s_addr)))
- nmask = htonl(IN_CLASSA_NET);
- else if (IN_CLASSB(ntohl(myip.s_addr)))
- nmask = htonl(IN_CLASSB_NET);
- else
- nmask = htonl(IN_CLASSC_NET);
-#ifdef BOOTP_DEBUG
- if (debug)
- printf("'native netmask' is %s\n", intoa(nmask));
-#endif
-
- /* Check subnet mask against net mask; toss if bogus */
- if ((nmask & smask) != nmask) {
-#ifdef BOOTP_DEBUG
- if (debug)
- printf("subnet mask (%s) bad\n", intoa(smask));
-#endif
- smask = 0;
- }
-
- /* Get subnet (or natural net) mask */
- netmask = nmask;
- if (smask)
- netmask = smask;
#ifdef BOOTP_DEBUG
if (debug)
printf("mask: %s\n", intoa(netmask));
@@ -385,7 +359,7 @@
break;
if (tag == TAG_SUBNET_MASK) {
- bcopy(cp, &smask, sizeof(smask));
+ bcopy(cp, &netmask, sizeof(netmask));
}
if (tag == TAG_GATEWAY) {
bcopy(cp, &gateip.s_addr, sizeof(gateip.s_addr));
@@ -445,7 +419,7 @@
vp = (struct cmu_vend *)cp;
if (vp->v_smask.s_addr != 0) {
- smask = vp->v_smask.s_addr;
+ netmask = vp->v_smask.s_addr;
}
if (vp->v_dgate.s_addr != 0) {
gateip = vp->v_dgate;

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 8:21 AM (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28290277
Default Alt Text
D8740.1775550099.diff (1 KB)

Event Timeline