linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
       [not found] ` <200109061554.TAA11031@ms2.inr.ac.ru>
@ 2001-09-06 17:48   ` Matthias Andree
  2001-09-06 18:06     ` kuznet
  0 siblings, 1 reply; 31+ messages in thread
From: Matthias Andree @ 2001-09-06 17:48 UTC (permalink / raw)
  To: kuznet
  Cc: Matthias Andree, Linux-Kernel mailing list, linux-net, netdev,
	Wietse Venema, Alan Cox

On Thu, 06 Sep 2001, kuznet@ms2.inr.ac.ru wrote:

> > What 4.3BSD do you refer to?
> 
> The most wide spread example is Linux. Is this not enough? :-)

Nah, if you argue with BSD, show real BSD. :-)

> > I "must"? Who says so? The ip reference says to use label for 2.0
> > compatibility, but other systems
> 
> You read manual and however did this. Cool. Do you not flout on me
> occasionally? :-)

No, the issue is being serious. I can do what I did, and I (personally)
don't get the idea that SIOCGIFNETMASK compatibility is properly
described  with "2.0 compatibility". 2.0 compatibility can mean anything
from "choke on SMP" to "does not compile with 2.95.2", "runs on Windows
2.0" but does not state anything about the ioctl SIOCGIFNETMASK API
whatsoever.

> > I don't get the compatibility reasons. An eth0 interface that has two
> 
> If you are going to continue to use legacy interface,
> each interface/alias must have ONE address. Period.

No. See below.

> The easiest way to prevent such problems is not to use "ip",
> but use ifconfig.

...or use the "label" option of ip. Linux has no "home" as SysV or BSD,
it pulls its behaviour from anywhere the maintainers like it, and turns
arbitrarily incompatible (from a portability point of view) this way.

> > How can one seriously expect a portable software to use SIOCGIFNETMASK
> 
> Using "ip" you have prepared configuration which is not portable by definition.
> Each portable application will fail on it.

Sure, because the interface is broken.

> > names for the subsequent addresses)? "Not at all"?
> 
> Not "at all". F.e. if you fill ifr_data with random bits
> and run the test on Solaris (which is also <4.4BSD, something grown
> of 4.2BSD) and SIOCGIFNETMASK _fails_ there, I can agree
> that adding this 4.4BSDism will not be disasterous.

Solaris 8 does not fail, and it does not care for passing in 85.85.85.85
as address (patch to inet_addr_local.c that I used to test below).
Solaris has "logical interfaces" with distinct (hme0:1) names. Linux has
not -> 4.4BSD behaviour.

We can have both worlds in the same API:
1. if the address family given in ifa_address is AF_INET, assume we have
a 4.4BSD (FreeBSD 4.x) application and search for name AND address.
2. if (1.) does not turn up an address, or the address family was not
AF_INET, fall back to 4.2BSD/Solaris behaviour and search for just the
name.

That way, applications that expect the 4.4BSD API can send in the alias
they want the netmask for, and if an application uses a 4.2BSD API and
passes junk in, it will get the proper information from the fallback.

To stop all that nonsense discussion and give a proof of concept (as
best evidence): this is my patch against 2.4.9, it fixes the issue while
retaining 4.3BSD compatibility, if you pass it junk, it will happily
return the netmask of the first address of that interface as it did
until now.

I did not invent a pointer to store in the inside loop so as to keep the
loop bodies quick and keep loop invariant code (AF_INET comparison) out,
before someone asks.

Constructive comments are welcome.  Flames are not.

--- net/ipv4/devinet.c.orig	Thu Sep  6 18:57:25 2001
+++ net/ipv4/devinet.c	Thu Sep  6 19:33:38 2001
@@ -20,6 +20,10 @@
  *	Changes:
  *	        Alexey Kuznetsov:	pa_* fields are replaced with ifaddr lists.
  *		Cyrus Durgin:		updated for kmod
+ *		Matthias Andree:	in devinet_ioctl, compare label and
+ *					address (4.4BSD alias style support),
+ *					fall back to comparing just the label
+ *					if no match found.
  */
 
 #include <linux/config.h>
@@ -463,6 +467,7 @@
 int devinet_ioctl(unsigned int cmd, void *arg)
 {
 	struct ifreq ifr;
+	struct sockaddr_in sin_orig;
 	struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr;
 	struct in_device *in_dev;
 	struct in_ifaddr **ifap = NULL;
@@ -479,6 +484,9 @@
 		return -EFAULT;
 	ifr.ifr_name[IFNAMSIZ-1] = 0;
 
+	/* save original address for comparison */
+	memcpy(&sin_orig, sin, sizeof(*sin));
+
 	colon = strchr(ifr.ifr_name, ':');
 	if (colon)
 		*colon = 0;
@@ -529,9 +537,24 @@
 		*colon = ':';
 
 	if ((in_dev=__in_dev_get(dev)) != NULL) {
-		for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next)
-			if (strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
-				break;
+		/* compare label and address (4.4BSD style) first if we
+		   have an AF_INET address family in the request */
+		if (sin_orig.sin_family == AF_INET) {
+			for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next)
+				if ((strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
+				    && sin_orig.sin_addr.s_addr == ifa->ifa_address)
+					break;
+		} else {
+			ifa = NULL;
+		}
+		/* we didn't get a match, maybe the application is
+		   4.3BSD-style and passed in junk so we fall back to
+		   comparing just the label */
+		if (ifa == NULL) {
+			for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next)
+				if (strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
+					break;
+		}
 	}
 
 	if (ifa == NULL && cmd != SIOCSIFADDR && cmd != SIOCSIFFLAGS) {



This patch to Postfix' inet_addr_local.c showed that Solaris doesn't
care about junk passed, and to verify Linux still returns a mask if you
pass it junk.

*** inet_addr_local.c.orig      Thu Sep  6 18:06:20 2001
--- inet_addr_local.c   Thu Sep  6 18:12:26 2001
***************
*** 133,138 ****
--- 133,139 ----
                if (mask_list) {
                    ifr_mask = (struct ifreq *) mymalloc(IFREQ_SIZE(ifr));
                    memcpy((char *) ifr_mask, (char *) ifr, IFREQ_SIZE(ifr));
+                   memset((char *)&(((struct sockaddr_in *)&ifr_mask->ifr_addr)->sin_addr), 0x55, 4);
                    if (ioctl(sock, SIOCGIFNETMASK, ifr_mask) < 0)
                        msg_fatal("%s: ioctl SIOCGIFNETMASK: %m", myname);
                    addr = ((struct sockaddr_in *) & ifr_mask->ifr_addr)->sin_addr;



-- 
Matthias Andree

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 17:48   ` [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19 Matthias Andree
@ 2001-09-06 18:06     ` kuznet
  2001-09-06 18:18       ` Wietse Venema
  0 siblings, 1 reply; 31+ messages in thread
From: kuznet @ 2001-09-06 18:06 UTC (permalink / raw)
  To: Matthias Andree
  Cc: matthias.andree, linux-kernel, linux-net, netdev, wietse, alan

Hello!

> Sure, because the interface is broken.

It is __legacy__ interface.


> Solaris 8 does not fail, 

That's all, the issue is closed.

Alexey

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 18:06     ` kuznet
@ 2001-09-06 18:18       ` Wietse Venema
  2001-09-06 18:38         ` kuznet
  2001-09-06 19:45         ` Alan Cox
  0 siblings, 2 replies; 31+ messages in thread
From: Wietse Venema @ 2001-09-06 18:18 UTC (permalink / raw)
  To: kuznet; +Cc: Matthias Andree, linux-kernel, linux-net, netdev, wietse, alan

kuznet@ms2.inr.ac.ru:
> Hello!
> 
> > Sure, because the interface is broken.
> 
> It is __legacy__ interface.
> 
> > Solaris 8 does not fail, 
> 
> That's all, the issue is closed.

Soldiers are marching down the street. The mother of one of those
soldiers is ever so proud.  All the other guys are marching out of
step.  Her son is the only one who does it right.

That's what it looks like for a person who writes Internet software
that aims to work on a wide variety of platforms.

Ah. That feels better.

	Wietse

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 18:18       ` Wietse Venema
@ 2001-09-06 18:38         ` kuznet
  2001-09-06 19:45         ` Alan Cox
  1 sibling, 0 replies; 31+ messages in thread
From: kuznet @ 2001-09-06 18:38 UTC (permalink / raw)
  To: Wietse Venema
  Cc: matthias.andree, linux-kernel, linux-net, netdev, wietse, alan

Hello!

> That's what it looks like

I am sorry, apparently, I have problems with sense of humour.
I was not able to find any connection.

Alexey

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 18:18       ` Wietse Venema
  2001-09-06 18:38         ` kuznet
@ 2001-09-06 19:45         ` Alan Cox
  2001-09-06 19:59           ` Wietse Venema
  2001-09-06 20:13           ` Matthias Andree
  1 sibling, 2 replies; 31+ messages in thread
From: Alan Cox @ 2001-09-06 19:45 UTC (permalink / raw)
  To: Wietse Venema
  Cc: kuznet, Matthias Andree, linux-kernel, linux-net, netdev, wietse, alan

> Soldiers are marching down the street. The mother of one of those
> soldiers is ever so proud.  All the other guys are marching out of
> step.  Her son is the only one who does it right.
> 
> That's what it looks like for a person who writes Internet software
> that aims to work on a wide variety of platforms.

I think you have the metaphor wrong. The older API is a bit like the 
cavalry charging into battle at the start of world war one. It may have been
how everyone did it but they guys with the "newfangled, really not how it
should be done, definitely not cricket"  machine guns got the last laugh

Alan

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 19:45         ` Alan Cox
@ 2001-09-06 19:59           ` Wietse Venema
  2001-09-06 20:20             ` jamal
                               ` (2 more replies)
  2001-09-06 20:13           ` Matthias Andree
  1 sibling, 3 replies; 31+ messages in thread
From: Wietse Venema @ 2001-09-06 19:59 UTC (permalink / raw)
  To: Alan Cox
  Cc: Wietse Venema, kuznet, Matthias Andree, linux-kernel, linux-net, netdev

Alan Cox:
> > Soldiers are marching down the street. The mother of one of those
> > soldiers is ever so proud.  All the other guys are marching out of
> > step.  Her son is the only one who does it right.
> > 
> > That's what it looks like for a person who writes Internet software
> > that aims to work on a wide variety of platforms.
> 
> I think you have the metaphor wrong. The older API is a bit like the 
> cavalry charging into battle at the start of world war one. It may have been
> how everyone did it but they guys with the "newfangled, really not how it
> should be done, definitely not cricket"  machine guns got the last laugh

Keep your superiority complex out of my mailbox, thank you.

	Wietse

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 19:45         ` Alan Cox
  2001-09-06 19:59           ` Wietse Venema
@ 2001-09-06 20:13           ` Matthias Andree
  2001-09-10  8:05             ` David Weinehall
  1 sibling, 1 reply; 31+ messages in thread
From: Matthias Andree @ 2001-09-06 20:13 UTC (permalink / raw)
  To: Alan Cox
  Cc: Wietse Venema, kuznet, Matthias Andree, linux-kernel, linux-net, netdev

On Thu, 06 Sep 2001, Alan Cox wrote:

> I think you have the metaphor wrong. The older API is a bit like the 
> cavalry charging into battle at the start of world war one. It may have been
> how everyone did it but they guys with the "newfangled, really not how it
> should be done, definitely not cricket"  machine guns got the last laugh

Alan, portability is an issue or Linux will lose. Admittedly, legacy
interfaces do not support all of those new features, but a rather
trivial patch of mine brings SIOCGIFNETMASK compatibility with both the
old and the new stuff, please name precisely the objections against
portability and compatibility with FreeBSD 4.x aliasing.

-- 
Matthias Andree
Outlook (Express) users: press Ctrl+F3 for the full source code of this post.
begin  dont_click_this_virus.exe
end

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 19:59           ` Wietse Venema
@ 2001-09-06 20:20             ` jamal
  2001-09-06 20:41               ` Wietse Venema
  2001-09-06 20:22             ` Alan Cox
  2001-09-10 16:11             ` Dennis
  2 siblings, 1 reply; 31+ messages in thread
From: jamal @ 2001-09-06 20:20 UTC (permalink / raw)
  To: Wietse Venema
  Cc: Alan Cox, kuznet, Matthias Andree, linux-kernel, linux-net, netdev



On Thu, 6 Sep 2001, Wietse Venema wrote:

> Alan Cox:
> > > Soldiers are marching down the street. The mother of one of those
> > > soldiers is ever so proud.  All the other guys are marching out of
> > > step.  Her son is the only one who does it right.
> > >
> > > That's what it looks like for a person who writes Internet software
> > > that aims to work on a wide variety of platforms.
> >
> > I think you have the metaphor wrong. The older API is a bit like the
> > cavalry charging into battle at the start of world war one. It may have been
> > how everyone did it but they guys with the "newfangled, really not how it
> > should be done, definitely not cricket"  machine guns got the last laugh
>
> Keep your superiority complex out of my mailbox, thank you.
>

Wietse,

netlink, as a few people have pointed to you is the 'proper' way to do
things. Sure, the BSDs did it the way you love it, but linux is a
different operating system (cut the "if its not Scottish its crap
mentality"). Netlink does improve on "the way its always been done for
the last 80 years". Infact netlink has already been approved to be (at
least informational) RFC. Look at a slightly dated draft at:
http://search.ietf.org/internet-drafts/draft-salim-netlink-jhshk-00.txt
Maybe you should preach to the BSDs about netlink?

cheers,
jamal

PS:- If you want help on writting netlink based code to achieve what you
are trying to do, just yell. Look at the source for the ip utility which
is within the iproute2 package.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 19:59           ` Wietse Venema
  2001-09-06 20:20             ` jamal
@ 2001-09-06 20:22             ` Alan Cox
  2001-09-06 20:38               ` Wietse Venema
  2001-09-10 16:11             ` Dennis
  2 siblings, 1 reply; 31+ messages in thread
From: Alan Cox @ 2001-09-06 20:22 UTC (permalink / raw)
  To: Wietse Venema
  Cc: Alan Cox, Wietse Venema, kuznet, Matthias Andree, linux-kernel,
	linux-net, netdev

> > how everyone did it but they guys with the "newfangled, really not how it
> > should be done, definitely not cricket"  machine guns got the last laugh
> 
> Keep your superiority complex out of my mailbox, thank you.

What is it about so many mail system authors and lacking sense of humour. 

Alan


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 20:22             ` Alan Cox
@ 2001-09-06 20:38               ` Wietse Venema
  0 siblings, 0 replies; 31+ messages in thread
From: Wietse Venema @ 2001-09-06 20:38 UTC (permalink / raw)
  To: Alan Cox
  Cc: Wietse Venema, kuznet, Matthias Andree, linux-kernel, linux-net, netdev

Alan Cox:
> > > how everyone did it but they guys with the "newfangled, really not how it
> > > should be done, definitely not cricket"  machine guns got the last laugh
> > 
> > Keep your superiority complex out of my mailbox, thank you.
> 
> What is it about so many mail system authors and lacking sense of humour. 

I pointed jokingly at a difference.

You had to talk about superiority.

The reference to email authors is completely uncalled for.

	Wietse

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 20:20             ` jamal
@ 2001-09-06 20:41               ` Wietse Venema
  2001-09-06 20:44                 ` jamal
  0 siblings, 1 reply; 31+ messages in thread
From: Wietse Venema @ 2001-09-06 20:41 UTC (permalink / raw)
  To: jamal
  Cc: Wietse Venema, Alan Cox, kuznet, Matthias Andree, linux-kernel,
	linux-net, netdev

Please stop that BSD versus Linux drivel. Either make a constructive
contribution or be silent.

I don't care what API is "superior", as long as it provides me with
the information that I want.

	Wietse

jamal:
> 
> 
> On Thu, 6 Sep 2001, Wietse Venema wrote:
> 
> > Alan Cox:
> > > > Soldiers are marching down the street. The mother of one of those
> > > > soldiers is ever so proud.  All the other guys are marching out of
> > > > step.  Her son is the only one who does it right.
> > > >
> > > > That's what it looks like for a person who writes Internet software
> > > > that aims to work on a wide variety of platforms.
> > >
> > > I think you have the metaphor wrong. The older API is a bit like the
> > > cavalry charging into battle at the start of world war one. It may have been
> > > how everyone did it but they guys with the "newfangled, really not how it
> > > should be done, definitely not cricket"  machine guns got the last laugh
> >
> > Keep your superiority complex out of my mailbox, thank you.
> >
> 
> Wietse,
> 
> netlink, as a few people have pointed to you is the 'proper' way to do
> things. Sure, the BSDs did it the way you love it, but linux is a
> different operating system (cut the "if its not Scottish its crap
> mentality"). Netlink does improve on "the way its always been done for
> the last 80 years". Infact netlink has already been approved to be (at
> least informational) RFC. Look at a slightly dated draft at:
> http://search.ietf.org/internet-drafts/draft-salim-netlink-jhshk-00.txt
> Maybe you should preach to the BSDs about netlink?
> 
> cheers,
> jamal
> 
> PS:- If you want help on writting netlink based code to achieve what you
> are trying to do, just yell. Look at the source for the ip utility which
> is within the iproute2 package.
> 
> 


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 20:41               ` Wietse Venema
@ 2001-09-06 20:44                 ` jamal
  2001-09-06 21:20                   ` Matthias Andree
  0 siblings, 1 reply; 31+ messages in thread
From: jamal @ 2001-09-06 20:44 UTC (permalink / raw)
  To: Wietse Venema
  Cc: Alan Cox, kuznet, Matthias Andree, linux-kernel, linux-net, netdev



Sigh.
Which part dont you understand?

Youve been told about 1000 times already, but let me shout:

YOU CAN GET THE INFORAMTION YOU WANT IF YOU USE NETLINK.

Cheers,
jamal



On Thu, 6 Sep 2001, Wietse Venema wrote:

> Please stop that BSD versus Linux drivel. Either make a constructive
> contribution or be silent.
>
> I don't care what API is "superior", as long as it provides me with
> the information that I want.
>
> 	Wietse
>
> jamal:
> >
> >
> > On Thu, 6 Sep 2001, Wietse Venema wrote:
> >
> > > Alan Cox:
> > > > > Soldiers are marching down the street. The mother of one of those
> > > > > soldiers is ever so proud.  All the other guys are marching out of
> > > > > step.  Her son is the only one who does it right.
> > > > >
> > > > > That's what it looks like for a person who writes Internet software
> > > > > that aims to work on a wide variety of platforms.
> > > >
> > > > I think you have the metaphor wrong. The older API is a bit like the
> > > > cavalry charging into battle at the start of world war one. It may have been
> > > > how everyone did it but they guys with the "newfangled, really not how it
> > > > should be done, definitely not cricket"  machine guns got the last laugh
> > >
> > > Keep your superiority complex out of my mailbox, thank you.
> > >
> >
> > Wietse,
> >
> > netlink, as a few people have pointed to you is the 'proper' way to do
> > things. Sure, the BSDs did it the way you love it, but linux is a
> > different operating system (cut the "if its not Scottish its crap
> > mentality"). Netlink does improve on "the way its always been done for
> > the last 80 years". Infact netlink has already been approved to be (at
> > least informational) RFC. Look at a slightly dated draft at:
> > http://search.ietf.org/internet-drafts/draft-salim-netlink-jhshk-00.txt
> > Maybe you should preach to the BSDs about netlink?
> >
> > cheers,
> > jamal
> >
> > PS:- If you want help on writting netlink based code to achieve what you
> > are trying to do, just yell. Look at the source for the ip utility which
> > is within the iproute2 package.
> >
> >
>


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 20:44                 ` jamal
@ 2001-09-06 21:20                   ` Matthias Andree
  2001-09-07  6:11                     ` Patrick Schaaf
                                       ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-06 21:20 UTC (permalink / raw)
  To: jamal
  Cc: Wietse Venema, Alan Cox, kuznet, Matthias Andree, linux-kernel,
	linux-net, netdev

On Thu, 06 Sep 2001, jamal wrote:

> Which part dont you understand?
> 
> Youve been told about 1000 times already, but let me shout:
> 
> YOU CAN GET THE INFORAMTION YOU WANT IF YOU USE NETLINK.

Calm down. Please. This discussion is about portability. I'm not
striving to turn Linux into FreeBSD, and neither is Wietse.

Not personally addressed to anyone, but for all Linux hackers to
consider are the following parts:

See it from the user-space programmer's point of view. Imagine you're
developing your software on FreeBSD or Solaris, or whatever. Now imagine
a client/user asks you about Linux support. You figure Linux does an
ioctl differently than BSD - that's all you see in the first place. You
start wondering, tracking, debugging, end up reading kernel sources, and
you see the difference. You go for support, and all you hear is "well,
we want to keep this non-portable for egoistic compatibility reasons,
use netlink instead". As to netlink, "go get ip of iproute2 and see how
it does things".

The programmer of a portable application is annoyed and frustrated
because it's just another fucking subtle API difference, and it
coincides with a boggled and outdated netdevice(7) man page.

It's not a sign of quality if Linux man pages are updated months after
the code either.

Does anyone think these issues help Linux or get Linux anywhere except
to bad reputation?

There are a lot of competent people with their hands on Linux, and
generally, Linux works well, and people are helpful, but sometimes,
developers seem to lose the more global view. Linux is not longer an end
in itself. Please don't let portability slip from your view.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 21:20                   ` Matthias Andree
@ 2001-09-07  6:11                     ` Patrick Schaaf
  2001-09-07  9:24                     ` Henning P. Schmiedehausen
  2001-09-08 13:25                     ` Kai Henningsen
  2 siblings, 0 replies; 31+ messages in thread
From: Patrick Schaaf @ 2001-09-07  6:11 UTC (permalink / raw)
  To: jamal, Wietse Venema, Alan Cox, kuznet, linux-kernel, linux-net, netdev

> > YOU CAN GET THE INFORAMTION YOU WANT IF YOU USE NETLINK.
> 
> Calm down. Please.

> Not personally addressed to anyone, but for all Linux hackers to
> consider are the following parts:

Calm down please, and get on with your job. The way you and Wietse
are trying to advocate Linux to change, is obviously just not working
out. Your politics only inflame, there is no progress in this thread.
Please stop it, and either ignore Linux in your software, or learn
how to use netlink for your task. There have been offers of help,
and you could probably have working code by now, if you took those
offers, instead of writing nice political speeches.

Please, EVERYBODY calm down. There is only pain. Deal with it.

regards
  Patrick


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 21:20                   ` Matthias Andree
  2001-09-07  6:11                     ` Patrick Schaaf
@ 2001-09-07  9:24                     ` Henning P. Schmiedehausen
  2001-09-07 11:13                       ` Matthias Andree
  2001-09-08 13:25                     ` Kai Henningsen
  2 siblings, 1 reply; 31+ messages in thread
From: Henning P. Schmiedehausen @ 2001-09-07  9:24 UTC (permalink / raw)
  To: linux-kernel

Matthias Andree <matthias.andree@stud.uni-dortmund.de> writes:

>See it from the user-space programmer's point of view. Imagine you're
>developing your software on FreeBSD or Solaris, or whatever. Now imagine
>a client/user asks you about Linux support. You figure Linux does an

So you actually say "make it the way BSD does, because that's what we
know and support". Sheesh. Why don't you just use Netlink and start
preaching to the BSD and Solaris folks that "this is the way how it
should be done". I'd say there are more Linux machines than BSD and
Solaris combined out there.

With this attitude, why don't you program WIN32? It's even more
widespread.

And Mr. Veenema has the guts to talk about "superiority complex"? Please.

If you want to write Software for Platform "L", use the APIs of
platform "L", not the legacy compatibility layer that "L" has to
support some old "B" applications. With this attitude you will be
stuck with "B" applications for the next twenty years. Or until "B"
decides to change its API when you will come running to the "A"
authors to demand that they must now change their legacy API to
support "B+".

	Regards
		Henning

P.S.: My personal conclusion: I go with sendmail ;-)


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-07  9:24                     ` Henning P. Schmiedehausen
@ 2001-09-07 11:13                       ` Matthias Andree
  0 siblings, 0 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-07 11:13 UTC (permalink / raw)
  To: hps; +Cc: linux-kernel

Henning P. Schmiedehausen schrieb am Freitag, den 07. September 2001:

> So you actually say "make it the way BSD does, because that's what we
> know and support". Sheesh. Why don't you just use Netlink and start
> preaching to the BSD and Solaris folks that "this is the way how it
> should be done". I'd say there are more Linux machines than BSD and
> Solaris combined out there.

I assume you know the meaning of the words "bloat" and "proliferation".

A portable application needs the BSD interface anyhow, and adding
another interface just for Linux makes it a testing/maintenance and thus
a reliability nightmare.

I wouldn't call the netlink example that's been posted here "trivial"
with its 215 lines.  You don't seriously expect a portable program to
add 200 lines of C to pull 5 bits of entropy out of the Linux kernel
where ANY other kernel does it with 4 lines of C, and Linux could do it
as well.

If people only commented (not flamed) constructively on my patch rather
than adding fuel to this unnecessary fire.

The Big Silence[TM].

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 21:20                   ` Matthias Andree
  2001-09-07  6:11                     ` Patrick Schaaf
  2001-09-07  9:24                     ` Henning P. Schmiedehausen
@ 2001-09-08 13:25                     ` Kai Henningsen
  2 siblings, 0 replies; 31+ messages in thread
From: Kai Henningsen @ 2001-09-08 13:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: matthias.andree, wietse

matthias.andree@stud.uni-dortmund.de (Matthias Andree)  wrote on 07.09.01 in <20010907131357.D13826@emma1.emma.line.org>:

> If people only commented (not flamed) constructively on my patch rather
> than adding fuel to this unnecessary fire.

I suspect people would be more likely to do that if they weren't told,  
over and over again,

"Stop this BSD vs. Linux bullshit. Just do it the BSD way. Stop your  
superiority complex. My way is obviously superior."

Doh! That's even sillier than djb's rants. And that's saying a lot.

MfG Kai

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 20:13           ` Matthias Andree
@ 2001-09-10  8:05             ` David Weinehall
  2001-09-10 12:26               ` Wietse Venema
                                 ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: David Weinehall @ 2001-09-10  8:05 UTC (permalink / raw)
  To: Alan Cox, Wietse Venema, kuznet, linux-kernel, linux-net, netdev

On Thu, Sep 06, 2001 at 10:13:59PM +0200, Matthias Andree wrote:
> On Thu, 06 Sep 2001, Alan Cox wrote:
> 
> > I think you have the metaphor wrong. The older API is a bit like the 
> > cavalry charging into battle at the start of world war one. It may have been
> > how everyone did it but they guys with the "newfangled, really not how it
> > should be done, definitely not cricket"  machine guns got the last laugh
> 
> Alan, portability is an issue or Linux will lose. Admittedly, legacy
> interfaces do not support all of those new features, but a rather
> trivial patch of mine brings SIOCGIFNETMASK compatibility with both the
> old and the new stuff, please name precisely the objections against
> portability and compatibility with FreeBSD 4.x aliasing.

Are you saying that Linux should implement compability with _new_
features in FreeBSD 4.x, while at the same time frowning at the fact
that Linux introduces a new API?! The mind boggles at the thought.

Please accept, that sometimes, just sometimes, there is a superior way
to do something, and implementing support for that might not be such
a bad idea after all. Whining about this causing "bloat and maintainance
nightmares" (no, not a direct quote, sorry for that) doesn't cut it,
because there are probably more Linux-machines running the software than
any BSD-machines, thus the netlink-code will get _more_ testing than
the legacy API.


/David Weinehall
  _                                                                 _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander      \\
//  Project MCA Linux hacker        //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10  8:05             ` David Weinehall
@ 2001-09-10 12:26               ` Wietse Venema
  2001-09-10 12:53                 ` David Weinehall
  2001-09-10 15:12               ` Matthias Andree
  2001-09-10 19:36               ` kuznet
  2 siblings, 1 reply; 31+ messages in thread
From: Wietse Venema @ 2001-09-10 12:26 UTC (permalink / raw)
  To: David Weinehall
  Cc: Alan Cox, Wietse Venema, kuznet, linux-kernel, linux-net, netdev

David Weinehall:
> Are you saying that Linux should implement compability with _new_
> features in FreeBSD 4.x, while at the same time frowning at the fact
> that Linux introduces a new API?! The mind boggles at the thought.

SIOCGIFNETMASK is not "new". It exists in systems as ancient as
SunOS 4.x, which pre dates FreeBSD 4.x by about 10 years. 

Evidence: RTFM the Postfix source code :-)

In other words, SIOCGIFNETMASK existed long before Linux could plug
into a network.

	Wietse

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 12:26               ` Wietse Venema
@ 2001-09-10 12:53                 ` David Weinehall
  2001-09-10 13:52                   ` Wietse Venema
  2001-09-10 15:18                   ` Matthias Andree
  0 siblings, 2 replies; 31+ messages in thread
From: David Weinehall @ 2001-09-10 12:53 UTC (permalink / raw)
  To: Wietse Venema; +Cc: Alan Cox, kuznet, linux-kernel, linux-net, netdev

On Mon, Sep 10, 2001 at 08:26:03AM -0400, Wietse Venema wrote:
> David Weinehall:
> > Are you saying that Linux should implement compability with _new_
> > features in FreeBSD 4.x, while at the same time frowning at the fact
> > that Linux introduces a new API?! The mind boggles at the thought.
> 
> SIOCGIFNETMASK is not "new". It exists in systems as ancient as
> SunOS 4.x, which pre dates FreeBSD 4.x by about 10 years. 
> 
> Evidence: RTFM the Postfix source code :-)
> 
> In other words, SIOCGIFNETMASK existed long before Linux could plug
> into a network.

"[snip] old and the new stuff, please name precisely the objections
against portability and compatibility with FreeBSD 4.x aliasing."
                                           ^^^^^^^^^^^^^^^^^^^^
This is what lead me to my conclusion. Care to clarify? If you simply
meant SIOCGIFNETMASK, why not write that instead instead of involving
FreeBSD 4.x?!


/David Weinehall
  _                                                                 _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander      \\
//  Project MCA Linux hacker        //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 12:53                 ` David Weinehall
@ 2001-09-10 13:52                   ` Wietse Venema
  2001-09-10 15:18                   ` Matthias Andree
  1 sibling, 0 replies; 31+ messages in thread
From: Wietse Venema @ 2001-09-10 13:52 UTC (permalink / raw)
  To: David Weinehall
  Cc: Wietse Venema, Alan Cox, kuznet, linux-kernel, linux-net, netdev

David Weinehall:
> On Mon, Sep 10, 2001 at 08:26:03AM -0400, Wietse Venema wrote:
> > David Weinehall:
> > > Are you saying that Linux should implement compability with _new_
> > > features in FreeBSD 4.x, while at the same time frowning at the fact
> > > that Linux introduces a new API?! The mind boggles at the thought.
> > 
> > SIOCGIFNETMASK is not "new". It exists in systems as ancient as
> > SunOS 4.x, which pre dates FreeBSD 4.x by about 10 years. 
> > 
> > Evidence: RTFM the Postfix source code :-)
> > 
> > In other words, SIOCGIFNETMASK existed long before Linux could plug
> > into a network.

Other vendors with SIOCGIFNETMASK in 10-year old releases: DEC, HP, IBM.

> "[snip] old and the new stuff, please name precisely the objections
> against portability and compatibility with FreeBSD 4.x aliasing."
>                                            ^^^^^^^^^^^^^^^^^^^^
> This is what lead me to my conclusion. Care to clarify? If you simply
> meant SIOCGIFNETMASK, why not write that instead instead of involving
> FreeBSD 4.x?!

The poster was referring to systems that he has personal experience
with.  Not everyone is a dinosaur like I am.

	Wietse

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10  8:05             ` David Weinehall
  2001-09-10 12:26               ` Wietse Venema
@ 2001-09-10 15:12               ` Matthias Andree
  2001-09-10 19:36               ` kuznet
  2 siblings, 0 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-10 15:12 UTC (permalink / raw)
  To: linux-kernel

On Mon, 10 Sep 2001, David Weinehall wrote:

> Please accept, that sometimes, just sometimes, there is a superior way
> to do something, and implementing support for that might not be such
> a bad idea after all. Whining about this causing "bloat and maintainance
> nightmares" (no, not a direct quote, sorry for that) doesn't cut it,
> because there are probably more Linux-machines running the software than
> any BSD-machines, thus the netlink-code will get _more_ testing than
> the legacy API.

Dave, that's just not the point, the application would have to offer TWO
interfaces, one for Linux, and one for the legacy API. The legacy API is
trivial and can be viewed in the kernel or in the application.

When the legacy API can fulfill the need with, after all, two or three
lines of code added, then there is no need to add two hundred of them to
the application.

Anyways, Alexey said the patch was correct, so it has been submitted to
Alan, Linus and Wietse, no matter what. The administrator or the
distributor can always choose to add the patch no matter what you say or
think. Show a bug in the patch, show an incompatibility cause, or remain
quiet. Please.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 12:53                 ` David Weinehall
  2001-09-10 13:52                   ` Wietse Venema
@ 2001-09-10 15:18                   ` Matthias Andree
  1 sibling, 0 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-10 15:18 UTC (permalink / raw)
  To: linux-kernel

On Mon, 10 Sep 2001, David Weinehall wrote:

> "[snip] old and the new stuff, please name precisely the objections
> against portability and compatibility with FreeBSD 4.x aliasing."
>                                            ^^^^^^^^^^^^^^^^^^^^
> This is what lead me to my conclusion. Care to clarify? If you simply
> meant SIOCGIFNETMASK, why not write that instead instead of involving
> FreeBSD 4.x?!

Dave, I came up with that because the same piece of code I looked at
choked on Linux 2.4, but not on FreeBSD 4.4-RC. I tracked this down,
fixed it and sent the patch.  This can all be read from my posts to the
thread.

The issue here is:

1/ Linux returns ALL addresses to SIOCGIFCONF, no matter if these are visible
to SIOCGIFNETMASK or not. Invisible addresses are the second and
subsequent addresses added with ip addr add without using a distinct
label. This means the innocent application that just feeds the
SIOCGIFCONF results into SIOCGIFNETMASK will get the netmask for the
first address. Of course, you can "filter" the addresses through
SIOCGIFADDR and drop the duplicates after that, but why not fix it for
the better?

2/ FreeBSD also uses IP aliases without "logical" interface names such
as eth0:0

3/ FreeBSD returns the netmask for the requested address, Linux returns
the netmask for the first address of the interface.

4/ I sent a patch to enhance the compatibility with "nameless" IP
aliases.

If you talk about NOT fixing the SIOCG* ioctl API, then fix SIOCGIFCONF
to just return one address per interface regardless how many IPs it
listens to.

But this has all been through. Reread my mails, please.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-06 19:59           ` Wietse Venema
  2001-09-06 20:20             ` jamal
  2001-09-06 20:22             ` Alan Cox
@ 2001-09-10 16:11             ` Dennis
  2 siblings, 0 replies; 31+ messages in thread
From: Dennis @ 2001-09-10 16:11 UTC (permalink / raw)
  To: jamal, Wietse Venema
  Cc: Alan Cox, kuznet, Matthias Andree, linux-kernel, linux-net, netdev

At 04:20 PM 09/06/2001, jamal wrote:
>Infact netlink has already been approved to be (at
>least informational) RFC.

Wow! It MUST be good then!!!


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10  8:05             ` David Weinehall
  2001-09-10 12:26               ` Wietse Venema
  2001-09-10 15:12               ` Matthias Andree
@ 2001-09-10 19:36               ` kuznet
  2001-09-10 20:14                 ` Matthias Andree
  2001-09-10 20:40                 ` Andi Kleen
  2 siblings, 2 replies; 31+ messages in thread
From: kuznet @ 2001-09-10 19:36 UTC (permalink / raw)
  To: tao, matthias.andree; +Cc: alan, wietse, linux-kernel, linux-net, netdev

Hello!

> a bad idea after all. Whining about this causing "bloat and maintainance

Listen, let's close this thread. :-)

The patch sent by Matthias is enough small not to speak about some bloat.


And I see no reasons to refuse this: it evidently improves the things
almost without efforts. No matter that this imporvement is not so useful,
as it would happen if I guessed this way from the very beginning.
So that applications will have to worry about compatibility with older
kernels in any case.


(BTW Matthias, while applying it to my tree, I noticed that
it does not check for SIOGGIFNETMASK. It would be better to do this only
when it is meaningful: I see only SIOGGIFNETMASK and SIOGGIFBROADCAST).

Alexey

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 19:36               ` kuznet
@ 2001-09-10 20:14                 ` Matthias Andree
  2001-09-11 15:22                   ` kuznet
  2001-09-10 20:40                 ` Andi Kleen
  1 sibling, 1 reply; 31+ messages in thread
From: Matthias Andree @ 2001-09-10 20:14 UTC (permalink / raw)
  To: kuznet; +Cc: matthias.andree, alan, wietse, linux-kernel, linux-net, netdev

On Mon, 10 Sep 2001, kuznet@ms2.inr.ac.ru wrote:

> (BTW Matthias, while applying it to my tree, I noticed that
> it does not check for SIOGGIFNETMASK. It would be better to do this only
> when it is meaningful: I see only SIOGGIFNETMASK and SIOGGIFBROADCAST).

Thanks for reviewing it again.

However, I think it should not be complicated. It's clear, simple and
can easily be understood.

Further reasons:

1/ It's not worth it.

  a/ If someone configures two IP addresses for a P2P-interface,
  something is wrong in a different part of the kernel, so
  SIOCGIFDSTADDR need not be exempt.

  b/ Treating SIOCGIFADDR the same way as SIOCGIFNETMASK has the
  advantage that kernels with 4.3BSD ioctl interface (Linux up to 2.2.19
  and 2.4.9) will return the first address of the interface rather than
  the alias address passed in. This way, an application can check if the
  kernel's ioctl interface is really IP alias aware, by just matching
  the ifr it passed in against the one it got back after SIOCGIFADDR.

  I have actually sent a patch to Wietse Venema which lets Postfix warn
  about alias interface addresses that it cannot obtain the netmasks for
  and just skip them, so it does not treat something it does not know
  how to handle.

2/ The search-for-ifa code is unconditionally called upon entry to that
   function. If it depends on the ioctl, it will confuse all people that
   expect all SIOCGIF* ioctls to have the same search properties and
   hinder debugging of applications.

Let's keep this as simple as possible. Performance is not an issue,
ioctl is not read, you don't call it from tight inner loops. Let's not
make it more error prone than it needs to be.

-- 
Matthias Andree
Outlook (Express) users: press Ctrl+F3 for the full source code of this post.
begin  dont_click_this_virus.exe
end

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 19:36               ` kuznet
  2001-09-10 20:14                 ` Matthias Andree
@ 2001-09-10 20:40                 ` Andi Kleen
  2001-09-10 21:19                   ` Matthias Andree
  2001-09-11 11:26                   ` Matthias Andree
  1 sibling, 2 replies; 31+ messages in thread
From: Andi Kleen @ 2001-09-10 20:40 UTC (permalink / raw)
  To: kuznet
  Cc: tao, matthias.andree, alan, wietse, linux-kernel, linux-net, netdev

On Mon, Sep 10, 2001 at 09:36:20PM +0200, kuznet@ms2.inr.ac.ru wrote:
> And I see no reasons to refuse this: it evidently improves the things
> almost without efforts. 

Doubtful.

> No matter that this imporvement is not so useful,
> as it would happen if I guessed this way from the very beginning.

That's a polite way to express it.

> So that applications will have to worry about compatibility with older
> kernels in any case.

Just hope then that no ifconfig or other binary has a two on the stack
when calling this.

-Andi

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 20:40                 ` Andi Kleen
@ 2001-09-10 21:19                   ` Matthias Andree
  2001-09-11 11:26                   ` Matthias Andree
  1 sibling, 0 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-10 21:19 UTC (permalink / raw)
  To: Andi Kleen
  Cc: kuznet, tao, matthias.andree, alan, wietse, linux-kernel,
	linux-net, netdev

Andi Kleen schrieb am Montag, den 10. September 2001:

> > So that applications will have to worry about compatibility with older
> > kernels in any case.
> 
> Just hope then that no ifconfig or other binary has a two on the stack
> when calling this.

Thanks for asking, however, nothing bad will happen if there are no
4.4BSD-style aliases. If there are, you have no business using ifconfig
anyways, and ifconfig certainly has not configured the aliases (it
overwrites the primary address unless you use a separate name such as
eth0:0).

Actually, in net-tools-1.56, ifconfig does write AF_INET onto its ifr
(it gets shot otherwise), without clearing the address field (which
contains the txqueuelen result). However, the worst thing that can
happen is that ifconfig displays one of the aliases - but the alias
would match the txqueuelen then. How many people have 0.0.0.* or *.0.0.0
addresses configured as alias? Not too many. None, to be precise.

It will not bite portable applications either since those init their
address properly.

-- 
Matthias Andree

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 20:40                 ` Andi Kleen
  2001-09-10 21:19                   ` Matthias Andree
@ 2001-09-11 11:26                   ` Matthias Andree
  1 sibling, 0 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-11 11:26 UTC (permalink / raw)
  To: linux-kernel

On Mon, 10 Sep 2001, Andi Kleen wrote:

> Just hope then that no ifconfig or other binary has a two on the stack
> when calling this.

One more reply to this, I inserted some debugging info, and all
addresses that the kernel saw on this ioctl so far are:

127.0.0.1
the machine's address
the machine's broadcast address
85.85.85.85 which I used in testing Postfix' patches
192.255.255.255 <- that's a piece of junk
192.168.0.222 <- that's a piece of junk

I already used ifconfig on that machine to display configuration data.

I'll see if other addresses turn up.

-- 
Matthias Andree

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-10 20:14                 ` Matthias Andree
@ 2001-09-11 15:22                   ` kuznet
  2001-09-11 16:39                     ` Matthias Andree
  0 siblings, 1 reply; 31+ messages in thread
From: kuznet @ 2001-09-11 15:22 UTC (permalink / raw)
  To: Matthias Andree
  Cc: matthias.andree, alan, wietse, linux-kernel, linux-net, netdev

Hello!

> Let's keep this as simple as possible.

A. No way to do the trick with SIOCSIF*.

B. The things does not become simpler when code does something random.
   The things become simpler when code checks something explicitly,
   otherwise you have to add comment: "Well, here we do this against
   plain logic, but this does not matter because of this, this and this."

Alexey

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
  2001-09-11 15:22                   ` kuznet
@ 2001-09-11 16:39                     ` Matthias Andree
  0 siblings, 0 replies; 31+ messages in thread
From: Matthias Andree @ 2001-09-11 16:39 UTC (permalink / raw)
  To: kuznet; +Cc: matthias.andree, alan, wietse, linux-kernel, linux-net, netdev

On Tue, 11 Sep 2001, kuznet@ms2.inr.ac.ru wrote:

> A. No way to do the trick with SIOCSIF*.

Well, ioctl cannot configure IP aliases, however. Indeed, it may be
useful to change the patch to not touch the SIOCS* functions and
document that it only accesses the first one.

> B. The things does not become simpler when code does something random.
>    The things become simpler when code checks something explicitly,
>    otherwise you have to add comment: "Well, here we do this against
>    plain logic, but this does not matter because of this, this and this."

That's true, but I would not want to make SIOCGIFADDR behave differently
than SIOCGIFNETMASK, in that case, I'd rather have SIOCGIFCONF just
return the first address per interface name.

I will prepare a new patch as my time permits (unless, of course,
someone is faster).

-- 
Matthias Andree
Outlook (Express) users: press Ctrl+F3 for the full source code of this post.
begin  dont_click_this_virus.exe
end

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2001-09-11 16:39 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20010906155920.B29583@maggie.dt.e-technik.uni-dortmund.de>
     [not found] ` <200109061554.TAA11031@ms2.inr.ac.ru>
2001-09-06 17:48   ` [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19 Matthias Andree
2001-09-06 18:06     ` kuznet
2001-09-06 18:18       ` Wietse Venema
2001-09-06 18:38         ` kuznet
2001-09-06 19:45         ` Alan Cox
2001-09-06 19:59           ` Wietse Venema
2001-09-06 20:20             ` jamal
2001-09-06 20:41               ` Wietse Venema
2001-09-06 20:44                 ` jamal
2001-09-06 21:20                   ` Matthias Andree
2001-09-07  6:11                     ` Patrick Schaaf
2001-09-07  9:24                     ` Henning P. Schmiedehausen
2001-09-07 11:13                       ` Matthias Andree
2001-09-08 13:25                     ` Kai Henningsen
2001-09-06 20:22             ` Alan Cox
2001-09-06 20:38               ` Wietse Venema
2001-09-10 16:11             ` Dennis
2001-09-06 20:13           ` Matthias Andree
2001-09-10  8:05             ` David Weinehall
2001-09-10 12:26               ` Wietse Venema
2001-09-10 12:53                 ` David Weinehall
2001-09-10 13:52                   ` Wietse Venema
2001-09-10 15:18                   ` Matthias Andree
2001-09-10 15:12               ` Matthias Andree
2001-09-10 19:36               ` kuznet
2001-09-10 20:14                 ` Matthias Andree
2001-09-11 15:22                   ` kuznet
2001-09-11 16:39                     ` Matthias Andree
2001-09-10 20:40                 ` Andi Kleen
2001-09-10 21:19                   ` Matthias Andree
2001-09-11 11:26                   ` Matthias Andree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).