Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2002 11:20:03 -0700 (PDT)
From:      "Crist J. Clark" <crist.clark@attbi.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/39896: netmask 0xffffff00 no longer works in /etc/exports
Message-ID:  <200206271820.g5RIK3fA094634@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR bin/39896; it has been noted by GNATS.

From: "Crist J. Clark" <crist.clark@attbi.com>
To: Ian Dowse <iedowse@maths.tcd.ie>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG,
	"Jin Guojun[DSD]" <j_guojun@lbl.gov>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206271820.g5RIK3fA094634>