From owner-freebsd-bugs Mon Jul 16 8:23:11 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id A6FFC37B407 for ; Mon, 16 Jul 2001 08:22:53 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f6GFMaD63933; Mon, 16 Jul 2001 18:22:36 +0300 (EEST) (envelope-from ru) Date: Mon, 16 Jul 2001 18:22:36 +0300 From: Ruslan Ermilov To: Peter Pentchev Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask Message-ID: <20010716182236.C51681@sunbay.com> Mail-Followup-To: Peter Pentchev , freebsd-bugs@FreeBSD.ORG References: <200107091620.f69GK6k90637@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107091620.f69GK6k90637@freefall.freebsd.org>; from roam@orbitel.bg on Mon, Jul 09, 2001 at 09:20:06AM -0700 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 On Mon, Jul 09, 2001 at 09:20:06AM -0700, Peter Pentchev wrote: > > On Mon, Jul 09, 2001 at 09:00:05AM -0700, Mark Blackman wrote: > > you're right, the correct behaviour is that the netmask change must be allied > > to a specific address as aliases are very common. > > > > Although, generally most aliases are have netmask of 255.255.255.255 and > > so the new netmask is logically applied to the "first". > > Yep, but there's still the case of more than one non-alias IP address.. > > > The fundamental problem is that changing the netmask loses the default > > route if you use an address as well as .. using an address causes the default > > route to go away. > > > > I just think its a violation of POLA that changing the netmask only > > causes your default route to disappear > > > > I posted a related message on freebsd-net. > > Unfortunately, I am not on -net :( > > Causing the default route to disappear is a side effect of a change > that was very much needed indeed - namely, that all routes associated > with an interface should disappear once that interface is brought down. > Only "dynamic" routes disappear when interface is downed. The "static" routes, like the "default" one, are deleted only when address of an interface gets deleted (which is the case with current ifconfig(8) implementation). > Yes, this is a POLA violation, but I prefer to think of it as a fix > for a problem that has annoyed quite a lot of people. Maybe there > could be a better solution, like adding an 'ifconfig change'.. > but then again, no - when you change an interface address's netmask, > you actually delete a route for the old network, and add a route > to the new one. Keeping all the routes which have addresses on > the old network as gateways, and whose gateway addresses are still > reachable via the new network, and removing all others, might require > a bit more work. > My patch seems to work OK here too. It's still not commit-ready though, as it only covers AF_INET case. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message