Date: Sun, 26 May 2002 10:54:04 +0200 From: Gerhard Sittig <Gerhard.Sittig@gmx.net> To: stable@freebsd.org Subject: Re: 4.6-PRERELASE fxp alias woes Message-ID: <20020526105404.Q1494@shell.gsinet.sittig.org> In-Reply-To: <15249.1022397169@verdi.nethelp.no>; from sthaug@nethelp.no on Sun, May 26, 2002 at 09:12:49AM %2B0200 References: <20020525211858.N1494@shell.gsinet.sittig.org> <15249.1022397169@verdi.nethelp.no>
next in thread | previous in thread | raw e-mail | index | archive | help
[ 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020526105404.Q1494>