Bug 48669 - ifup setting IFF_* flags improperly, /sbin/ip not handling them
ifup setting IFF_* flags improperly, /sbin/ip not handling them
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: dhcpcd (Show other bugs)
7.3
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-11 03:09 EDT by Pekka Savola
Modified: 2007-03-26 23:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-28 15:34:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pekka Savola 2001-07-11 03:09:01 EDT
initscripts 6.02.

1)

/sbin/ifup performs:

    [ -n "${ARP}${PROMISC}${ALLMULTI}" ] && \
        ip link set ${DEVICE} $(toggle_value arp $ARP) \ 
           $(toggle_value promisc $PROMISC) \
           $(toggle_value allmulti $ALLMULTI)

however, of these, /sbin/ifup only supports arp.

So, the fix is to hack /sbin/ip to include support for setting
promisc,allmulti,trailers
(not too difficult) or reverting back to the good ol' method using ifconfig
and removing
toggle_value.

2)
There could be an interface hook also for:
$MULTICAST
$TRAILERS

3)

Also, the default value for ethernet (at least) now seems to be:
          UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1

Where previously in RHL71 this was:
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

This is caused by /sbin ip link set eth0 up rather than ifconfig eth0 up. 
The latter is more correct and it's what other OS's (e.g. BSD) use too; at
least multicast must be enabled.  (Note: at least ifconfig has been tested
to work rather ok on all kinds of mediums, like link layers that don't
support multicast).

4) 

In DHCP environment at least, doing  'ifdown eth0' always gives 'Operation
failed'.  The
interface has been disabled though.  Doing 'ifdown eth0' does not fail
anymore.
Strace shows this is probably caused by pump, and happens after connect(3)
to /var/run/pump.sock.  Apparently releasing the lease of the interface
didn't work properly.
Comment 1 Bill Nottingham 2001-07-11 15:13:00 EDT
pump has issues ATM. Looking into the other stuff.
Comment 2 Pekka Savola 2001-07-11 15:21:22 EDT
substitute 

however, of these, /sbin/ifup only supports arp.

with 

however, of these, /sbin/ip only supports arp.

if 1) is not making any sense. ;-)
Comment 3 Glen Foster 2001-07-13 18:06:09 EDT
This defect considered MUST-FIX for Fairfax gold-release.
Comment 4 Pekka Savola 2001-07-28 10:54:13 EDT
4) is worked around in beta3.

3): this only happens when DHCP is used.  Statically configured, the interface
is ok.
Comment 5 David Lawrence 2001-07-28 19:16:55 EDT
I am not sure if this related or not but when using beta3 I get the following
error message when bringing up an dhcp configured interface

Determining IP information for eth0... failed; no link present.  Check cable?

This worked fine before upgrading to Beta3. Using dhcpcd (manually) instead of
pump, I am able to get an address properly.
Comment 6 Pekka Savola 2001-07-28 23:53:53 EDT
Not directly related, see #49949 for your problem.. the NIC driver doesn't support MII properly.
(The robustness of the check is a valid issue nonetheless).

A good question is which interface flags you get when using dhcp manually.  If you get the same as
me with DHCP, this problem is probably with dhcpcd.
Comment 7 Bill Nottingham 2001-08-08 22:54:50 EDT
Support for changing PROMISC & ALLMULTI flags added in iproute-2.2.4-14.
Comment 8 Pekka Savola 2001-08-11 06:57:29 EDT
Sorry for putting too many bugs in one report...

3), which is IMO most important, is still unsolved AFAIS.

(also 2) but I don't think that's a show-stopper, especially if 3) is "fixed")
Comment 9 Pekka Savola 2001-08-11 07:48:28 EDT
Also, should initscripts Requires: iproute >= 2.2.4-14 ?

(this is a marginal feature, so I'm not sure if the policy dictates this...)
Comment 10 Bill Nottingham 2001-08-12 00:50:52 EDT
3) is not an initscripts problem.
Comment 11 Glen Foster 2001-08-14 14:20:04 EDT
According to the development staff, the original problem is fixed; there's a
secondary problem that
warrants Should-fix status.  Thus, the tag for this defect is being changed.
Comment 12 Pekka Savola 2001-08-14 14:46:17 EDT
The legacy behaviour has been used for a very, very long time.  I'm not sure what disabling trailers might
do, but not having multicast enabled by default would definitely be a major drawback for many sites that
do use it.

So I'd like this to be a very strong SHOULD if not MUST. :-)
Comment 13 Bill Nottingham 2001-08-22 23:02:24 EDT
FWIW, in regards to /sbin/ip: its docs say:

The {\tt ip} utility does not change the \verb|PROMISC|
or \verb|ALLMULTI| flags. These flags are considered
obsolete and should not be changed administratively.

According to the author, this should be enabled using packet socket, not a random
tool.
Comment 14 Pekka Savola 2001-08-23 00:32:10 EDT
If only the world was perfect...

For example xircom pcmcia cards have a bug (related to hardware I think) with handling 
of multicast, so that you must be in promisc or use allmulti for that to work... (e.g. ipv6 stuff
doesn't work at all without allmulti flag on it).

I don't see much need to set promisc administratively at network config scripts, but allmulti might be
useful in scenarios like above.
Comment 15 Bill Nottingham 2001-08-23 00:44:25 EDT
allmulti, AFAIK, doesn't even do much of anything.
Comment 16 Pekka Savola 2001-08-23 00:48:14 EDT
Well, for some drivers/hardware having problems with multicast, it apperently does :-)

(I think it's like promiscuous mode but only for all multicast traffic, but I'm not sure...)
Comment 17 Elliot Lee 2001-08-26 16:24:02 EDT
Hmm, WRT #3, is it possible that the pump failures are caused by having the
different interface flags set?

Does anaconda use ifconfig and initscripts /sbin/ip for setting up the
interface? That would explain why pump works in the installer but not on an
installed system, maybe. I can't find out where exactly anaconda does its "turn
on network for install" thing.
Comment 18 Pekka Savola 2001-08-26 16:29:28 EDT
IIRC, 3) happens because dhcpcd is used.  With pump, I think it works all right (when pump works in the first place, that is).  
A problem here was, that the default changed from pump to dhcpcd due to pump failing mysteriously.  I wonder if this would 
work now (post-roswell2), as initscripts has been fixed to assing 'scope host' to loopback interface.
Comment 19 Elliot Lee 2001-12-28 14:34:15 EST
OK, I've totally forgotten the reasons for this bug still being open - can
someone who remembers the problem describe what was remaining to be fixed, and
whether the problem even exists in 7.2/rawhide?
Comment 20 Pekka Savola 2001-12-28 15:34:53 EST
If dhcpcd is installed and BOOTPROTO=dhcp (so that it's used), interface flags after 'ifup eth0' will be:

UP BROADCAST NOTRAILERS RUNNING

Not:

UP BROADCAST RUNNING MULTICAST

The latter is how they're set with pump, and AFAIR how they've been set before RHL 7.2 with dhcpcd too
(this might have something to do with switching from ifconfig to iproute).

IMO, unless there are strong reason not to, the latter flags make much more sense.
Comment 21 Elliot Lee 2001-12-31 14:30:13 EST
Well, as far as I can find, NOTRAILERS is a completely unused flag from BSD, so
I'm leaving it there, but dhcpcd-1.3.21pl1-3 does now turn on the MULTICAST flag
by default.

Note You need to log in before you can comment on or make changes to this bug.