Bug 48669

Summary: ifup setting IFF_* flags improperly, /sbin/ip not handling them
Product: [Retired] Red Hat Linux Reporter: Pekka Savola <pekkas>
Component: dhcpcdAssignee: Elliot Lee <sopwith>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: high    
Version: 7.3CC: msw, notting
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-28 20:34:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pekka Savola 2001-07-11 07:09:01 UTC
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 19:13:00 UTC
pump has issues ATM. Looking into the other stuff.

Comment 2 Pekka Savola 2001-07-11 19:21:22 UTC
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 22:06:09 UTC
This defect considered MUST-FIX for Fairfax gold-release.

Comment 4 Pekka Savola 2001-07-28 14:54:13 UTC
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 23:16:55 UTC
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-29 03:53:53 UTC
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-09 02:54:50 UTC
Support for changing PROMISC & ALLMULTI flags added in iproute-2.2.4-14.

Comment 8 Pekka Savola 2001-08-11 10:57:29 UTC
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 11:48:28 UTC
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 04:50:52 UTC
3) is not an initscripts problem.

Comment 11 Glen Foster 2001-08-14 18:20:04 UTC
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 18:46:17 UTC
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-23 03:02:24 UTC
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 04:32:10 UTC
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 04:44:25 UTC
allmulti, AFAIK, doesn't even do much of anything.

Comment 16 Pekka Savola 2001-08-23 04:48:14 UTC
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 20:24:02 UTC
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 20:29:28 UTC
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 19:34:15 UTC
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 20:34:53 UTC
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 19:30:13 UTC
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.