Debian Bug report logs - #319832
bridge-utils: cannot handle more than one stanza in /etc/network/interfaces

version graph

Package: bridge-utils; Maintainer for bridge-utils is Santiago Garcia Mantinan <manty@debian.org>; Source for bridge-utils is src:bridge-utils.

Reported by: mathias@weyland.ch

Date: Mon, 25 Jul 2005 05:03:49 UTC

Severity: normal

Found in version bridge-utils/1.0.4-1

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, Santiago García Mantiñán <manty@debian.org>:
Bug#319832; Package bridge-utils. Full text and rfc822 format available.

Acknowledgement sent to mathias@weyland.ch:
New Bug report received and forwarded. Copy sent to Santiago García Mantiñán <manty@debian.org>. Full text and rfc822 format available.

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

From: Mathias Weyland <mathias@weyland.ch>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: bridge-utils: cannot handle more than one stanza in /etc/network/interfaces
Date: Mon, 25 Jul 2005 03:48:58 +0200
Package: bridge-utils
Version: 1.0.4-1
Severity: normal

If there is more than one stanza in /etc/network/interfaces concerning
the same bridge interface (e.g. for the inet and inet6 family) only the
last will become active. Example:

iface br0 inet static
        address 192.168.14.1
        netmask 255.255.0.0
        bridge_ports eth0

iface br0 inet6 static
	address 2001:8e0:abcd:5d7::1
	netmask 64	
        bridge_ports eth0

After the initialization of the interfaces only the ipv6 address is
assigned to the bridge.

Ugly workaround:

iface br0 inet static
        address 192.168.14.1
        netmask 255.255.0.0
        bridge_ports eth0
        up ifconfig br0 add 2001:8e0:abcd:5d7::1/64
				
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.30-xbox
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages bridge-utils depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libsysfs1                   1.2.0-5      interface library to sysfs

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Santiago García Mantiñán <manty@debian.org>:
Bug#319832; Package bridge-utils. Full text and rfc822 format available.

Acknowledgement sent to Santiago Garcia Mantinan <manty@debian.org>:
Extra info received and forwarded to list. Copy sent to Santiago García Mantiñán <manty@debian.org>. Full text and rfc822 format available.

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

From: Santiago Garcia Mantinan <manty@debian.org>
To: 319832@bugs.debian.org
Subject: No way to cleanly add the multi stanza support
Date: Sat, 18 Feb 2006 18:49:35 +0100
Hi!

I've been looking at this bug for a while and I cannot see a way to add
support for what you want.

The problem here is that when one stanza is processed it doesn't know if
more stanzas are to come or not, and we need to know that because the last
stanza needs to remove the bridge interface after taking it down.

I think that all other packages handling virtual devices like bridge-utils
does (I'm thinking in the vlan package, for example) will suffer from this
lack of support.

If anybody does come up with a clean way to add support for all this please
comment it so that we can finally close this bug, until then... I won't be
able to fix this.

Sorry for not commenting on this before.

Regards...
-- 
Manty/BestiaTester -> http://manty.net



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#319832; Package bridge-utils. Full text and rfc822 format available.

Acknowledgement sent to Santiago Garcia Mantinan <manty@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

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

From: Santiago Garcia Mantinan <manty@debian.org>
To: 319832@bugs.debian.org
Cc: Anthony Towns <ajt@debian.org>
Subject: Rethinking about this bug, solving it via ifupdown?
Date: Thu, 18 Oct 2007 13:29:09 +0200
The problem here is not with the bridge not getting the two addresses, which
I can fix on the scripts or you can fix by avoiding the bridge parameters on
the second stanza, The problem would be on the ifdown, as we would get an
error for the second stanza as the first one has already removed the
interface.

I've been trying to see a difference again in the data the bridge scripts
have in the two post-down calls to remove the interface just on the last one
but I have failed again.

I'm CCing ajt, ifupdown's mantainer to see if he can put some light on this.

So, I see three ways to handle this:

1- To pass the ball to the ifupdown guys so that they implement a way for
the scripts to know if there are more stanzas to come or this is the last
one, the one that must remove the interface (This can be achieved simply if
the interface is taken down only on the last stanza).

2- We implement a way to count and note down the number of stanzas we have
or something on this line (ideas are welcome).

3- We add an script run on pre-down that creates the bridge interface again
if it doesn't exist anymore so that the following commands that would
operate on it to take it down don't crash.

For the moment a way to fix this on the config would be to write it like
this:

iface br0 inet static
        address 192.168.14.1
        netmask 255.255.0.0
        bridge_ports eth0

iface br0 inet6 static
        address 2001:8e0:abcd:5d7::1
        netmask 64          
        pre-down exit 1

This means that only the first stanza has the bridge parameters defined and
thus it is the only one creating or removing the bridge, plus we add the
pre-down thing to all other stanzas to avoid the execution of their down
scripts so that they don't give any errors.

For the moment I'm going to add this info to the Readme and refer this bug
on it.

Regards...
-- 
Manty/BestiaTester -> http://manty.net




Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Garcia Mantinan <manty@debian.org>:
Bug#319832; Package bridge-utils. (Sun, 01 Mar 2009 03:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nick Andrew <nick@nick-andrew.net>:
Extra info received and forwarded to list. Copy sent to Santiago Garcia Mantinan <manty@debian.org>. (Sun, 01 Mar 2009 03:51:04 GMT) Full text and rfc822 format available.

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

From: Nick Andrew <nick@nick-andrew.net>
To: 319832@bugs.debian.org
Subject: bridge-utils: cannot handle more than one stanza in /etc/network/interfaces
Date: Sun, 1 Mar 2009 14:47:57 +1100
I think the problem comes from thinking that it's reasonable to have
two (or more) stanzas per interface. The syntax of /etc/network/interfaces
should permit complete configuration of an interface within a single
stanza.

So, for the moment, the "ugly workaround" is best:

iface br0 inet static
	address 192.168.14.1
	netmask 255.255.0.0
	bridge_ports eth0
	up ifconfig br0 add 2001:8e0:abcd:5d7::1/64

An extension to the /etc/network/interfaces syntax might look like this:

iface br1
	inet address 192.168.14.1/16
	inet gateway 192.168.1.255
	inet6 address 2001:8e0:abcd:5d7::1/64
	bridge_ports eth0

An automatically configured ipv4+ipv6 bridge interface might look
like this:

iface br2
	inet dhcp
	bridge_ports eth0

(the kernel will configure the ipv6 address when it receives a router
advertisement packet).

Nick.




Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Garcia Mantinan <manty@debian.org>:
Bug#319832; Package bridge-utils. (Sat, 14 Aug 2010 13:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Claudius Hubig <debian@chubig.net>:
Extra info received and forwarded to list. Copy sent to Santiago Garcia Mantinan <manty@debian.org>. (Sat, 14 Aug 2010 13:06:03 GMT) Full text and rfc822 format available.

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

From: Claudius Hubig <debian@chubig.net>
To: 319832@bugs.debian.org
Subject: Any change?
Date: Sat, 14 Aug 2010 14:58:00 +0200
Hey,

it’s been more than a year since the last post – is there going to be any change to this?

Best regards,

Claudius
-- 
Power is the finest token of affection.

http://chubig.net/




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#319832; Package bridge-utils. (Fri, 27 Aug 2010 15:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Santiago Garcia Mantinan <manty@debian.org>:
Extra info received and forwarded to list. (Fri, 27 Aug 2010 15:45:03 GMT) Full text and rfc822 format available.

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

From: Santiago Garcia Mantinan <manty@debian.org>
To: Claudius Hubig <debian@chubig.net>, 319832@bugs.debian.org
Subject: Re: Bug#319832: Any change?
Date: Fri, 27 Aug 2010 17:30:49 +0200
> it’s been more than a year since the last post – is there going to be any change to this?

Well, I didn't have the time to investigate more on this issue and didn't
receive any patches for this, plus we are frozen now, so I guess the ugly
workarounds are still the only solution right now.

Regards...
-- 
Manty/BestiaTester -> http://manty.net




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 16:29: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.