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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 15 2001 - 21:00:28 EST