From: Andries.Brouwer@cwi.nl
To: Andries.BRouwer@cwi.nl, kuznet@ms2.inr.ac.ru
Cc: linux-kernel@vger.kernel.org, net-tools@lina.inka.de, philb@gnu.org
Subject: Re: ifconfig and SIOCSIFADDR
Date: Wed, 25 Jul 2001 19:23:55 GMT [thread overview]
Message-ID: <200107251923.TAA21053@vlet.cwi.nl> (raw)
From kuznet@mops.inr.ac.ru Wed Jul 25 18:37:10 2001
> 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
Yes. It didn't in 2.0. It does in 2.2 and 2.4.
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_.
Yes. I liked such logic thirty years ago. That is Unix.
Today I am less sure that it is a good idea to expect users
to read the kernel and ifconfig sources, but I did and know.
Since you don't like changing the current behaviour, we should
probably document it (say, in ifconfig(8)).
Andries
ifconfig(8):
SYNOPSIS
...
ifconfig interface [aftype] [address] options
OPTIONS
Since options are read and transmitted to the kernel
in the order given, and since giving an address parameter
causes resetting address related information (such as
netmask and broadcast address) to a default, any non-default
such address related information should be given after the
address parameter (if any).
next reply other threads:[~2001-07-25 19:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-25 19:23 Andries.Brouwer [this message]
2001-07-25 19:40 ` kuznet
2001-07-26 14:47 ` Gerhard Mack
-- strict thread matches above, loose matches on Subject: below --
2001-07-25 20:26 Andries.Brouwer
2001-07-24 14:47 Andries.Brouwer
2001-07-24 16:05 ` Ingo Oeser
2001-07-24 22:50 ` Alexey Kuznetsov
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=200107251923.TAA21053@vlet.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=net-tools@lina.inka.de \
--cc=philb@gnu.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®