Date: Mon, 12 Feb 2007 17:30:35 -0200 From: JoaoBR <joao@matik.com.br> To: freebsd-stable@freebsd.org, kevin@insidesystems.net, brooks@freebsd.org Subject: Re: Desired behaviour of "ifconfig -alias" Message-ID: <200702121730.36307.joao@matik.com.br> In-Reply-To: <200702121809.l1CI9rBq065457@lurza.secnetix.de> References: <200702121809.l1CI9rBq065457@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 12 February 2007 16:09, Oliver Fromme wrote: > > > > it is not misleading and it is a perfect term. With alias you add > > secondary addresses to an interface. Like secondary is probably the > > better word, > > No, not at all. As soon as you use the terms "primary IP > address" and "secondary IP addresses", you imply that they > are not equal. But they are equal. It's just a list of > IP addresses assigned to an interface which happens to have > a certain order. > nobody claims that there is an master-slave order or something, alias is th= e=20 secondary in order of time, but not in value, I do not even understand why= =20 you talking so much about this, the point is more than clear=20 > > Yes, that's why I wrote it should be changed to not contain > the word "alias" anymore, but simply an enumerated list. > > > > If no IP address is specified, then it's not completely > > > nonsensical to remove the first address. In fact I've > > > used that short-cut to quickly remove the only address > > > from an interface. I've used "ifconfig xyz0 delete" > > > quite a lot. > > yes it is! it does not matter which word, without an IP address it should N= OT=20 remove anything > > the man page tells us that -alias removes *the* specified address and > > not the first, also the man page does not say that there is any further > > action when *no* IP address specified > > That's true. Usually if something is not documented, the > behaviour is undefined. > undefined is absolutely not similar to remove something .. > > delete is according to the man page another word for -alias, that mean= s, > > using grammatical logic that -alias is the main command, > > No. It means that "delete" and "remove" are aliases for > "-alias". In reality they're simply equal. ;-) > > > then according to the man > > page there is no other command as "-alias *IP*" to remove an IP address > > and -alias only should not remove anything > > It's not documented that way. As I wrote above. > > If something is not documented, that doesn't mean that it > shouldn't do anything at all. In that case a _lot_ of > things wouldn't work. :-) all commands which remove something "usally" say something when trying to u= se=20 without value, rm, rmdir, rmuser ... I really do not remember any other=20 then -alias which does so > > you see, now you apply logic because you want to and when not not ... = ;) > > > > to let it more clear what I mean, you say: "you don't tell it anything > > to add" so why the heck "ifconfig nic -alias" should remove one if I do > > not tell so? > > In the case of adding something, what should be added if > nothing is specified? Should the tool invent an arbitrary > IP address and add it? Now that would be nonsensical. > > But when removing something without specifying which one, > it makes some sense to simply remove the first existing > address on that interface. It would even be OK with me > to remove the last one, or an arbitrary one -- I use that > shortcut mostely when I need to remove the only address > from an interface (or all existing addresses), so it > doesn't matter. > come on, now your are looking up a way out of this mess ... > In fact, it might also make sense to enhance the syntax > to allow the specification of a number, for example > "ifconfig xyz0 delete #2" would remove the second address my god what a horrible idea is that! do you remember "#" in UNIX???? the command "ifconfig nic -alias IP" is OK, perfect, even delete is, the=20 problem and the only problem is that both remove without specifying a value= a=20 value and that *IS* wrong behaviour, otherwise *you* must agree that rm=20 removes the first file it finds, rmuser the first user and and and, that is= =20 wrong, documented or not > However, such a feature will run into problems when the > set of ip addresses is not an ordered list anymore, which > might very well happen in the future. Then there will be > no "first" and "last" anymore, but instead the interface > will just have an unordered set of IP addresses. In fact > I wish that would already be the case, so people saying > "primary" and "secondary" would shut up already. :-) then they come up in random order on each "ifconfig nic" :) ??? =2D-=20 Jo=E3o A mensagem foi scaneada pelo sistema de e-mail e pode ser considerada segura. Service fornecido pelo Datacenter Matik https://datacenter.matik.com.br
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702121730.36307.joao>