Debian Bug report logs - #619866
ifupdown: "ifup eth0" doesn't work after suspend/resume

version graph

Package: ifupdown; Maintainer for ifupdown is Andrew Shadura <andrewsh@debian.org>; Source for ifupdown is src:ifupdown.

Reported by: Vincent Lefevre <vincent@vinc17.net>

Date: Mon, 28 Mar 2011 03:48:01 UTC

Severity: normal

Found in version ifupdown/0.6.10

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#619866; Package ifupdown. (Mon, 28 Mar 2011 03:48:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
New Bug report received and forwarded. Copy sent to Anthony Towns <ajt@debian.org>. (Mon, 28 Mar 2011 03:48:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ifupdown: "ifup eth0" doesn't work after suspend/resume
Date: Mon, 28 Mar 2011 05:36:39 +0200
Package: ifupdown
Version: 0.6.10
Severity: normal

I use netplug to run ifup when an Ethernet link is detected.
The ifup command works at boot time or when I unplug/plug in
the Ethernet cable, but not after a suspend/resume. Logging
shows that the ifup command is run (see below), but it doesn't
do what it should.

My /etc/netplug/netplug script contains:

[...]
case "$action" in
in)
    if [ -x /sbin/ifup ]; then
        logger "/sbin/ifup -v $dev"
        exec /sbin/ifup -v "$dev"
    else
[...]

so that the ifup execution will be shown in the logs.

The /etc/network/interfaces file contains:

[...]
mapping eth0
  script /usr/local/sbin/guessnet-wrapper
  map default: eth0-dhcp
  map debug: true
  map timeout: 2
[...]

and the /usr/local/sbin/guessnet-wrapper script starts with:

#!/bin/sh

logger "guessnet-wrapper $*"

so that its execution will also be shown in the logs.

After a suspend/resume, I get in the /var/log/syslog file:

[...]
Mar 28 05:13:17 xvii netplugd[2008]: eth0: state INACTIVE flags 0x00001003 UP,BROADCAST,MULTICAST -> 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000
Mar 28 05:13:17 xvii netplugd[10770]: /etc/netplug/netplug eth0 in -> pid 10770
Mar 28 05:13:17 xvii logger: /sbin/ifup -v eth0
Mar 28 05:13:17 xvii netplugd[2008]: eth0: state INNING pid 10770 exited status 0
Mar 28 05:13:17 xvii kernel: [ 2696.180909] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
Mar 28 05:13:17 xvii kernel: [ 2696.180913] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
Mar 28 05:13:17 xvii kernel: [ 2696.181357] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 28 05:13:27 xvii kernel: [ 2706.704236] eth0: no IPv6 routers present
[...]

As one can see, the ifup command is run, but not the guessnet-wrapper
script!

After booting, the syslog file contains:

[...]
Mar 28 05:19:34 xvii netplugd[2016]: eth0: state DOWN flags 0x00001003 UP,BROADCAST,MULTICAST -> 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000
Mar 28 05:19:34 xvii netplugd[2054]: /etc/netplug/netplug eth0 in -> pid 2054
Mar 28 05:19:34 xvii logger: /sbin/ifup -v eth0
Mar 28 05:19:34 xvii kernel: [   44.232918] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
Mar 28 05:19:34 xvii kernel: [   44.232922] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
Mar 28 05:19:34 xvii kernel: [   44.233377] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 28 05:19:37 xvii logger: guessnet-wrapper eth0
[...]

The guessnet-wrapper script has been run and everything is fine.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ifupdown depends on:
ii  libc6                         2.11.2-13  Embedded GNU C Library: Shared lib
ii  lsb-base                      3.2-27     Linux Standard Base 3.2 init scrip
ii  net-tools                     1.60-23    The NET-3 networking toolkit

ifupdown recommends no packages.

Versions of packages ifupdown suggests:
ii  iproute                      20110107-2  networking and traffic control too
ii  isc-dhcp-client [dhcp3-clien 4.1.1-P1-16 ISC DHCP client
ii  ppp                          2.4.5-5     Point-to-Point Protocol (PPP) - da

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#619866; Package ifupdown. (Tue, 29 Mar 2011 00:39:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. (Tue, 29 Mar 2011 00:39:05 GMT) Full text and rfc822 format available.

Message #10 received at 619866@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: 619866@bugs.debian.org
Subject: Re: ifupdown: "ifup eth0" doesn't work after suspend/resume
Date: Tue, 29 Mar 2011 02:29:11 +0200
On 2011-03-28 05:36:39 +0200, Vincent Lefevre wrote:
> My /etc/netplug/netplug script contains:
> 
> [...]
> case "$action" in
> in)
>     if [ -x /sbin/ifup ]; then
>         logger "/sbin/ifup -v $dev"
>         exec /sbin/ifup -v "$dev"
>     else
> [...]

I've added a "strace -f -o ..." before /sbin/ifup to see what happens,
and the strace output ends with:

5771  write(2, "/sbin/ifup: interface eth0 alrea"..., 46) = 46
5771  exit_group(0)                     = ?

This corresponds to the message (unfortunately not visible anywhere):

  interface eth0 already configured

So, it may not be a bug in the ifupdown package, but I'm not sure.

The problem is that after the suspend/resume, the interface is up,
but it doesn't have an IP address. First, is it a correct behavior?

If no, which package is the culprit?

If yes, shouldn't "ifup eth0" (without --force) really configure the
interface when it is up but doesn't have an IP address? If not, then
the bug should be reassigned to netplug, because its default script
just does /sbin/ifup "$dev", which is then not sufficient (I suppose
that the --force option should be given).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 20:49:03 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.