From owner-freebsd-stable Sun May 26 11:15:51 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by hub.freebsd.org (Postfix) with SMTP id D046E37B407 for ; Sun, 26 May 2002 11:15:42 -0700 (PDT) Received: (qmail 21601 invoked by uid 0); 26 May 2002 18:15:41 -0000 Received: from p509103ab.dip0.t-ipconnect.de (HELO mail.gsinet.sittig.org) (80.145.3.171) by mail.gmx.net (mp001-rz3) with SMTP; 26 May 2002 18:15:41 -0000 Received: (qmail 70288 invoked from network); 26 May 2002 08:54:04 -0000 Received: from shell.gsinet.sittig.org (192.168.11.153) by mail.gsinet.sittig.org with SMTP; 26 May 2002 08:54:04 -0000 Received: (from sittig@localhost) by shell.gsinet.sittig.org (8.11.3/8.11.3) id g4Q8s4L70284 for stable@freebsd.org; Sun, 26 May 2002 10:54:04 +0200 (CEST) (envelope-from sittig) Date: Sun, 26 May 2002 10:54:04 +0200 From: Gerhard Sittig To: stable@freebsd.org Subject: Re: 4.6-PRERELASE fxp alias woes Message-ID: <20020526105404.Q1494@shell.gsinet.sittig.org> Mail-Followup-To: stable@freebsd.org References: <20020525211858.N1494@shell.gsinet.sittig.org> <15249.1022397169@verdi.nethelp.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15249.1022397169@verdi.nethelp.no>; from sthaug@nethelp.no on Sun, May 26, 2002 at 09:12:49AM +0200 Organization: System Defenestrators Inc. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [ why did you break the attribution? please leave this info intact! ] On Sun, May 26, 2002 at 09:12 +0200, sthaug@nethelp.no wrote: > > > > >ifconfig_fxp0="inet 216.109.194.4 netmask 255.255.255.0" > > > >ifconfig_fxp0_alias0="inet 216.109.194.8 netmask 255.255.255.0" > > > > > > As everyone has pointed out, the kernel is now enforcing netmasks on > > > same-subnet aliases. > > > > > > But I've got a really simple question: Why, if it is so easy to detect > > > programatically, do we not just *fix* it automagically? Is there *ever* > > > a case where it is useful to have a same-subnet alias with a different > > > subnet mask (besides the obvious point of it doesn't work with the > > > current code). > > > > Huh? I trust a computer to detect _that_ there are collisions. > > But I'd *never* trust the machine to decide _which_ one of > > multiple parameters is the wrong one. > > Very simple. Allow the same netmask as the primary address, *and* /32. > Nothing else. Thus > > ifconfig_fxp0="inet 216.109.194.4 netmask 255.255.255.0" > ifconfig_fxp0_alias0="inet 216.109.194.8 netmask 255.255.255.0" > and > ifconfig_fxp0="inet 216.109.194.4 netmask 255.255.255.0" > ifconfig_fxp0_alias0="inet 216.109.194.8 netmask 255.255.255.255" > > would both be allowed. Well, right after sending my first reply I felt that I should have put an example in it. :) Imagine the following setup: ifconfig_fxp0=" inet 192.168.20.120 netmask 255.255.255.0" ifconfig_fxp0_alias0="inet 192.168.30.130 netmask 255.255.255.255" Of course a program can detect that these values "don't fit". But how do you determine if the alias entry's address is wrong or the netmask? Only an admin can, looking at the local topology. Not even human spectators can decide which of the parameters needs correction. And since your above restriction doesn't solve any problem while it prevents perfectly legal scenarios from working (like ifconfig_fxp0=" inet 192.168.20.120 netmask 255.255.255.0" ifconfig_fxp0_alias0="inet 192.168.20.122 netmask 255.255.255.255" ifconfig_fxp0_alias1="inet 172.16.120.130 netmask 255.255.0.0" ) it is to be rejected. :> virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message