From owner-freebsd-hackers Wed Dec 17 15:49:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA27641 for hackers-outgoing; Wed, 17 Dec 1997 15:49:14 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA26934 for ; Wed, 17 Dec 1997 15:43:42 -0800 (PST) (envelope-from brian@awfulhak.org) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.7/8.8.7) with ESMTP id XAA08835; Wed, 17 Dec 1997 23:30:21 GMT (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199712172330.XAA08835@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Archie Cobbs cc: grog@lemis.com (Greg Lehey), dennis@etinc.com, hackers@freebsd.org Subject: Re: ifconfig reports bogus netmask In-reply-to: Your message of "Tue, 16 Dec 1997 18:21:38 PST." <199712170221.SAA17619@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Dec 1997 23:30:21 +0000 From: Brian Somers Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Greg Lehey writes: > > On Tue, Dec 16, 1997 at 10:39:08AM -0500, dennis wrote: > > > > > > Is there any chance of this getting fixed? Its been broken forever. I'm > > > talking about PTP interfaces, where the routes are inherently host > > > mask routes. ifconfig reports the natural mask or whatever you give > > > it....and its rather confusing trying to explain to the woodchucks that > > > its wrong. > > > > Well, ifconfig reports the net mask that is set. And yes, it's > > inappropriate for "real" point-to-point interfaces. But it's not the > > reporting that's wrong, it's the setting. Just set all ones when > > setting the interface, and you'll be OK. > > > > I suppose I should mention that there's a sizeable minority who think > > this is the way the net mask *should* be. Maybe one of them will > > explain, I keep forgetting. > > I agree with Dennis.. > > The bottom line is that no matter what you set the netmask to, > it has absolutely no effect on anything. > > So unless the current behavior is going to be changed, the netmask > should be removed from the display (at least) because it serves only > to confuse people. Has this always been like this ? I would *expect* the netmask to control who's on the other side, so an interface with inet 10.0.2.1 --> 10.0.1.1 netmask 0xffffff00 should create a route with 10.0.1/24 10.0.2.1 UH ..... tun0 This clearly isn't the case - the mask is lost when the route is created at SIOCAIFADDR time. This, IMHO is wrong. ioctl(SIOCAIFADDR) should provide RTA_NETMASK as a part of rtm_addrs ! > -Archie > > ___________________________________________________________________________ > Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com -- Brian , , Don't _EVER_ lose your sense of humour....