From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Andries.BRouwer@cwi.NL
Cc: linux-kernel@vger.kernel.org
Subject: Re: ifconfig and SIOCSIFADDR
Date: Wed, 25 Jul 2001 02:50:24 +0400 (MSD) [thread overview]
Message-ID: <200107242250.CAA00488@mops.inr.ac.ru> (raw)
In-Reply-To: <200107241447.OAA07015@vlet.cwi.nl> from "Andries.BRouwer@cwi.NL" at Jul 24, 1 07:15:00 pm
Hello!
> and the last ioctl destroys the information set by the previous two.
Exactly.
> I consider this a kernel bug,
No. And even not a feature, but just the only eligible way.
SIOCSIFADDR resets all previously set address information and
changes it to some legal defaults, otherwise you will stay
with illegal netmask/broadcast set for previously
set address on this interface.
BTW, if no address was selected before, setting netmask
and broadcast etc. simply fails.
So that you had some address set on the interface before
you did the operation and that netmask is set for _that_ address_.
> and ifconfig should assume that SIOCSIFADDR may be destructive
> and hence wait with setting netmask and broadcast address
> until after the SIOCSIFADDR.
I think it is even worse idea. ifconfig is low level tool and should
execute ops in the order, which it was asked. Especially, taking into
account that they are not commutative. Leave this logic to config
scripts or to human brains.
Actually, ifconfig does some too "clever" things by hisorical reasons,
sort of automic upping interface, when setting address. This is very
confusing and inconvenint, however, it is impossible to change by the
same (historical) reasons.
Alexey
next prev parent reply other threads:[~2001-07-25 16:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 14:47 Andries.Brouwer
2001-07-24 16:05 ` Ingo Oeser
2001-07-24 22:50 ` Alexey Kuznetsov [this message]
2001-07-25 19:23 Andries.Brouwer
2001-07-25 19:40 ` kuznet
2001-07-26 14:47 ` Gerhard Mack
2001-07-25 20:26 Andries.Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200107242250.CAA00488@mops.inr.ac.ru \
--to=kuznet@ms2.inr.ac.ru \
--cc=Andries.BRouwer@cwi.NL \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®