Your message dated Sat, 20 Oct 2007 11:02:02 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#405215: fixed in bridge-utils 1.2-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: bridge-utils
Version: 1.2-1
Severity: wishlist
Tags: patch

Hello!

I created the following patch, which allows for specifying `bridge_ports'
interfaces by using regular expressions, as described in the updated
documentation file.  Please consider to include this patch.


There is a comment in the `postdown' file that could be addressed and /
or there could be some preprocessing mechanism used to avoid the
duplication of code between the two modified program files.


Regards,
 Thomas
diff -ru bridge-utils-1.2.orig/debian/README.Debian 
bridge-utils-1.2/debian/README.Debian
--- bridge-utils-1.2.orig/debian/README.Debian  2007-01-01 15:13:38.000000000 
+0100
+++ bridge-utils-1.2/debian/README.Debian       2007-01-01 20:10:57.000000000 
+0100
@@ -29,7 +29,7 @@
 Well, after setting this, an ifup br0, or the next reboot, should let you
 have a bridge up and running, after waiting for the ports to get to the
 forwarding status, of course. This bridge will be using all your ethX
-interfaces, as we have stated on the bridge_port line.
+interfaces, as we have stated on the bridge_ports line.
 
 Now the Debian bridge setup scripts will wait for it to get ready to
 work. They do this by trying to guess the maximum time that the bridge
@@ -95,13 +95,12 @@
 /etc/network/interfaces to setup the bridge, so you don't have to go and
 look at the scripts...
 
-bridge_ports <interfaces>
+bridge_ports <interface specification>
        this option must exist for the scripts to setup the bridge, with
        it you specify the ports you want to add to your bridge, either
        using "none" if you want a bridge without any interfaces or you
-       want to add them later using brctl, "all" if you want all the
-       ethX interfaces to be added to the bridge, or a list of the
-       interfaces you want to add separated by spaces, for example:
+       want to add them later using brctl, or a list of the interfaces
+       you want to add separated by spaces, for example:
 
                        bridge_ports eth0 eth4
 
@@ -109,6 +108,26 @@
        will be used by the bridge, as this will be setup automatically
        by the scripts when bringing the bridge up.
 
+       If you need to specify the interfaces more flexibly, you can
+       use the following syntax:
+
+                       bridge_ports regex (eth|vif).*
+
+       This means to evaluate (as in egrep(1)) the expressions that
+       follow after "regex" until either the end or a "noregex" statement
+       is reached.  The regular expressions are evaluated against all
+       local interfaces and those that match are added.
+
+       Specifying "all" is short for "regex eth.* noregex" and will get
+       all the ethX interfaces added to the bridge.
+
+       Carrying this to the extremes, the following is valid syntax:
+
+                       bridge_ports all regex if.0 noregex ext0 regex vif.*
+
+       This will add all ethX interfaces, the ifX0 interfaces, the ext0
+       interface and all vifX interfaces.
+
 bridge_ageing <time>
        set ageing time, default is 300, can have a fractional part.
 
diff -ru bridge-utils-1.2.orig/debian/postdown bridge-utils-1.2/debian/postdown
--- bridge-utils-1.2.orig/debian/postdown       2007-01-01 15:13:38.000000000 
+0100
+++ bridge-utils-1.2/debian/postdown    2007-01-01 17:07:18.000000000 +0100
@@ -25,11 +25,56 @@
 
 ifconfig $IFACE down
 
-for i in $INTERFACES
+# TODO: Should be perhaps simply remove all interfaces that are currently
+# attached to the bridge?  But what to do then with the invokations of
+# `if-pre-up.d/vlan'?
+all_interfaces= &&
+unset all_interfaces &&
+set x $INTERFACES &&
+shift &&
+while [ x"${1+set}" = xset ]
 do
-  if [ "$i" = "all" ]; then
-    i=$(grep eth /proc/net/dev|sed 's/\(\ *\)\(eth[^:]*\)\(.*\)/\2/')
-  fi
+  # For compatibility: the `all' option.
+  case $1 in
+      all)
+         shift &&
+         set regex eth.\* noregex ${1+"$@"}
+         ;;
+  esac
+
+  case $1-`uname -s` in
+      regex-Linux)
+         all_interfaces=`sed -n 's%^[\ ]*\([^:]*\):.*$%\1%p' < /proc/net/dev`
+         shift
+         ;;
+      regex-*)
+         echo -n "$0 needs to be ported for your `uname -s` system.  " >&2
+         echo "Trying to continue nevertheless." >&2
+         shift
+         ;;
+      noregex-*)
+         all_interfaces=
+         unset all_interfaces
+         shift
+         ;;
+  esac
+
+  case ${all_interfaces+regex} in
+      regex)
+         # The following interface specification are to be parsed as regular
+         # expressions against all interfaces the system provides.
+         i=`egrep "^$1$" << EOAI
+$all_interfaces
+EOAI
+`
+         ;;
+      *)
+         # Literal interfaces.
+         i=$1
+         ;;
+  esac
+  shift
+
   for port in $i
   do
     ifconfig $port down && brctl delif $IFACE $port && \
diff -ru bridge-utils-1.2.orig/debian/preup bridge-utils-1.2/debian/preup
--- bridge-utils-1.2.orig/debian/preup  2007-01-01 15:13:38.000000000 +0100
+++ bridge-utils-1.2/debian/preup       2007-01-01 17:07:12.000000000 +0100
@@ -25,11 +25,53 @@
 
 brctl addbr $IFACE &&
 
-for i in $INTERFACES
+all_interfaces= &&
+unset all_interfaces &&
+set x $INTERFACES &&
+shift &&
+while [ x"${1+set}" = xset ]
 do
-  if [ "$i" = "all" ]; then
-    i=$(grep eth /proc/net/dev|sed 's/\(\ *\)\(eth[^:]*\)\(.*\)/\2/')
-  fi
+  # For compatibility: the `all' option.
+  case $1 in
+      all)
+         shift &&
+         set regex eth.\* noregex ${1+"$@"}
+         ;;
+  esac
+
+  case $1-`uname -s` in
+      regex-Linux)
+         all_interfaces=`sed -n 's%^[\ ]*\([^:]*\):.*$%\1%p' < /proc/net/dev`
+         shift
+         ;;
+      regex-*)
+         echo -n "$0 needs to be ported for your `uname -s` system.  " >&2
+         echo "Trying to continue nevertheless." >&2
+         shift
+         ;;
+      noregex-*)
+         all_interfaces=
+         unset all_interfaces
+         shift
+         ;;
+  esac
+
+  case ${all_interfaces+regex} in
+      regex)
+         # The following interface specification are to be parsed as regular
+         # expressions against all interfaces the system provides.
+         i=`egrep "^$1$" << EOAI
+$all_interfaces
+EOAI
+`
+         ;;
+      *)
+         # Literal interfaces.
+         i=$1
+         ;;
+  esac
+  shift
+
   for port in $i
   do
     if [ -x /etc/network/if-pre-up.d/vlan ]; then

--- End Message ---
--- Begin Message ---
Source: bridge-utils
Source-Version: 1.2-2

We believe that the bug you reported is fixed in the latest version of
bridge-utils, which is due to be installed in the Debian FTP archive:

bridge-utils_1.2-2.diff.gz
  to pool/main/b/bridge-utils/bridge-utils_1.2-2.diff.gz
bridge-utils_1.2-2.dsc
  to pool/main/b/bridge-utils/bridge-utils_1.2-2.dsc
bridge-utils_1.2-2_i386.deb
  to pool/main/b/bridge-utils/bridge-utils_1.2-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Garcia Mantinan <[EMAIL PROTECTED]> (supplier of updated bridge-utils 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 15 Oct 2007 22:57:46 +0200
Source: bridge-utils
Binary: bridge-utils
Architecture: source i386
Version: 1.2-2
Distribution: unstable
Urgency: low
Maintainer: Santiago Garcia Mantinan <[EMAIL PROTECTED]>
Changed-By: Santiago Garcia Mantinan <[EMAIL PROTECTED]>
Description: 
 bridge-utils - Utilities for configuring the Linux ethernet bridge
Closes: 405215 406907 410277 431860
Changes: 
 bridge-utils (1.2-2) unstable; urgency=low
 .
   * Fix port no and id reading from sysfs (taken from git).
   * Fix segfault on bridge named "bridge", thanks Robert. Closes: #431860.
   * Fix printing of unknown commands, thanks Julien. Closes: #406907.
   * Fix the FAQ url. Closes: #410277.
   * Apply the regexp patch. Closes: #405215.
Files: 
 cb3cd4142fc502899e3d49a8d8543f01 595 net optional bridge-utils_1.2-2.dsc
 e1e1b1ffc3a0e7afa8616ed52755ee53 11379 net optional bridge-utils_1.2-2.diff.gz
 6864d3c69bd75f18ca90c0596d67f117 29128 net optional bridge-utils_1.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHGRtPcv3CBfajKo4RAu4uAKCTyqXRRcifUQX8XankK20xAUEmnwCdHLpQ
vYWSNY4XJB3gb0ucgReyr/w=
=Ui7A
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to