From owner-freebsd-bugs Thu Jun 27 11:20:42 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id CE70037B405 for ; Thu, 27 Jun 2002 11:20:03 -0700 (PDT) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g5RIK3JU094635 for ; Thu, 27 Jun 2002 11:20:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g5RIK3fA094634; Thu, 27 Jun 2002 11:20:03 -0700 (PDT) Date: Thu, 27 Jun 2002 11:20:03 -0700 (PDT) Message-Id: <200206271820.g5RIK3fA094634@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J. Clark" Subject: Re: bin/39896: netmask 0xffffff00 no longer works in /etc/exports Reply-To: "Crist J. Clark" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/39896; it has been noted by GNATS. From: "Crist J. Clark" To: Ian Dowse Cc: FreeBSD-gnats-submit@FreeBSD.ORG, "Jin Guojun[DSD]" Subject: Re: bin/39896: netmask 0xffffff00 no longer works in /etc/exports Date: Thu, 27 Jun 2002 11:18:01 -0700 On Thu, Jun 27, 2002 at 06:59:01PM +0100, Ian Dowse wrote: > In message <200206271730.g5RHU3PL084959@freefall.freebsd.org>, "Crist J. Clark" > writes: > > Sorry. Wrong cut-n-paste. I did use 0xffffff00 and it seemed to work > > fine. When did you notice a change? src/sbin/mountd/mountd.c hasn't > > changed since 4.4-RELEASE. I can't see anything that deals with > > reading the netmask that has changed since 1998. The mask is actually > > read with the inet_network(3) function, and I see no significant > > changes in that for several years either. > > I'm not sure how this could have ever worked correctly, since > inet_network(3) does not support hex addresses of this form. Actually, it does. The manpage says, All numbers supplied as ``parts'' in a `.' notation may be decimal, octal, or hexadecimal, as specified in the C language (i.e., a leading 0x or 0X implies hexadecimal; otherwise, a leading 0 implies octal; other- wise, the number is interpreted as decimal). And since it is perfectly valid to provide an internet address as a single "part," an address like 0xffffff00 is totally valid by these rules. To illustrate this, all of these are the same IP address, 0xffffff00 4294967040 0xff.0xffff00 255.16776960 0xff.0xff.0xff00 255.255.65280 0xff.0xff.0xff.0x0 255.255.255.0 -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message