From owner-freebsd-hackers Thu Sep 21 9:54:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.osd.bsdi.com (adsl-63-202-177-115.dsl.snfc21.pacbell.net [63.202.177.115]) by hub.freebsd.org (Postfix) with ESMTP id 6023537B423 for ; Thu, 21 Sep 2000 09:54:21 -0700 (PDT) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.9.3/8.9.3) with ESMTP id XAA02428; Wed, 20 Sep 2000 23:59:25 -0700 (PDT) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200009210659.XAA02428@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Paul Saab Cc: freebsd-hackers@freebsd.org Subject: Re: diskless workstation In-reply-to: Your message of "Wed, 20 Sep 2000 23:48:19 PDT." <20000920234819.A68513@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 20 Sep 2000 23:59:25 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Mike Smith (msmith@freebsd.org) wrote: > > > > I think this is correct, actually. Danny, can you confirm that you're > > using one of the class A address spaces (eg. 10.*.*.*?) > > > > Actually, IMO the code around this is entirely wrong; we should always > > respect the mask supplied by the server, and only use the canonical mask > > if we don't get one at all. > > It does.. look futher down in the code. No, if the supplied mask is wider than the canonical mask (as in eg. Danny's case), the supplied mask is discarded. See the "toss if bogus" test: if (IN_CLASSA(myip.s_addr)) nmask = htonl(IN_CLASSA_NET); else if (IN_CLASSB(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; -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message