Package: ifupdown
Version: 0.6.5
Severity: normal
Tags: Patch

The latest version of ifupdown has broken logical interface support as
follows:

"ifup -v eth0=work" produces:
|  Suu:~# ifup -vvv eth0=work
|  Configuring interface eth0=work (inet)
|  run-parts --verbose /etc/network/if-pre-up.d
|  run-parts: executing /etc/network/if-pre-up.d/wireless-tools
|  
*  ifconfig work 10.254.0.4 netmask 255.255.255.0 broadcast 10.254.0.255        
    up
|  SIOCSIFADDR: No such device
|  work: ERROR while getting interface flags: No such device
|  SIOCSIFNETMASK: No such device
|  SIOCSIFBRDADDR: No such device
|  work: ERROR while getting interface flags: No such device
|  work: ERROR while getting interface flags: No such device
|  Failed to bring up work.

Obviously, the settings are coming from the work stanza OK, but surely
that should be
*  ifconfig eth0 10.254.0.4 netmask 255.255.255.0 broadcast 10.254.0.255        
    up
?

Anyway, assuming I'm right, here's the patch:

--- ifupdown.nw.org 2005-04-05 15:04:39.215576720 +1000
+++ ifupdown.nw 2005-04-05 15:05:06.911366320 +1000
@@ -2801,7 +2801,7 @@
    int i;

    if (strncmpz(id, "iface", idlen) == 0) {
-       return ifd->logical_iface;
+       return ifd->real_iface;
    } else {
        for (i = 0; i < ifd->n_options; i++) {
            if (strncmpz(id, ifd->option[i].name, idlen) == 0) {

Simply, the various references to %iface% in the .defn files are passed
to the system, so should be the real_iface (ie. what the system sees it
as) not logical_iface (ie. what the stanza's called)

If this is wrong, maybe ifrename should be being applied earlier in the
process? I can see how people might prefer the actual interface to end
up being called 'work' or 'home', but given how people object to
'wlanX', I doubt this would actually ever fly.

I'd love to mark this "Important" but when I asked on #debian if anyone
else had seen this, no one else seemed to be to using this
functionality.

Also, while I was poking around, checking for a preexisting bug report,
it looks like #244101 has been fixed by providing $LOGICAL to the if-*
scripts. Just thought I'd mention it, I haven't tested it or anything.
I just noticed the variable when I was tracking this problem through the
.nw file.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (900, 'experimental'), (900, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]       1.4.47       Debian configuration management sy
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  net-tools                   1.60-10      The NET-3 networking toolkit

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to