diff -u bridge-utils-1.5/debian/bridge-utils-interfaces.5 bridge-utils-1.5/debian/bridge-utils-interfaces.5 --- bridge-utils-1.5/debian/bridge-utils-interfaces.5 +++ bridge-utils-1.5/debian/bridge-utils-interfaces.5 @@ -177,14 +177,12 @@ fractional part. .TP .BI bridge_hw " MAC address" -set the Ethernet MAC address of all the bridge interfaces to the -specified one so that the bridge ends up having this hardware -address as well. WARNING: use this only if you know what you are -doing, changing the MAC address of the cards may cause trouble -if you don't know what you are doing. To see the discussion about -this feature and the problems that can cause you can try to have -a look at the bug that asked for this feature visiting +set the Ethernet MAC address of the bridge to the specified one. +There were some concerns of how this was done in the past, see: \fIhttp://bugs.debian.org/271406\fP +but we are doing it on a new way now that shouldn't be as bad, see: +\fIhttp://bugs.debian.org/725786\fP +however you should know what you are doing before using this option. .TP .BI bridge_maxage " time" set max message age to \fItime\fP seconds, default is 20, can have a diff -u bridge-utils-1.5/debian/changelog bridge-utils-1.5/debian/changelog --- bridge-utils-1.5/debian/changelog +++ bridge-utils-1.5/debian/changelog @@ -1,3 +1,31 @@ +bridge-utils (1.5-9ubuntu1) wily; urgency=low + + * Merge from Debian unstable (LP: #1487108). Remaining changes: + - Set BRIDGE_HOTPLUG=yes as that's the behaviour we had in the past and + need for the event based networking. Reverting change from 1.5-4. + - Don't call ifup from bridge-network-interface, instead just call brctl + and let udev/upstart bring the interface up. + + -- Andy Whitcroft Thu, 20 Aug 2015 17:02:39 +0100 + +bridge-utils (1.5-9) unstable; urgency=low + + * Fix kernel version check and adjust it to match kernel behaviours. + Closes: #725786. + + -- Santiago Garcia Mantinan Tue, 20 May 2014 23:01:06 +0200 + +bridge-utils (1.5-8) unstable; urgency=low + + * Change the way to set the hardware address (MAC) of the bridge, + don't set it on the ports, set it on the bridge instead if the kernel + is quite recent (version where it started to work is unknown, we need + to find this). This needs testing and relates to #725786. + * Change Architecture to linux-any. Closes: #745164. + * Apply Colin's patch to fix cross-build, thanks. Closes: #734873. + + -- Santiago Garcia Mantinan Sat, 07 Dec 2013 18:55:13 +0100 + bridge-utils (1.5-7ubuntu1) utopic; urgency=medium * Resynchronise with Debian. Remaining changes: @@ -321,0 +350 @@ + diff -u bridge-utils-1.5/debian/control bridge-utils-1.5/debian/control --- bridge-utils-1.5/debian/control +++ bridge-utils-1.5/debian/control @@ -3,11 +3,11 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Santiago Garcia Mantinan -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Build-Depends: debhelper (>=9.0.0), dpkg-dev (>=1.16.1), autoconf Package: bridge-utils -Architecture: any +Architecture: linux-any Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: ifupdown diff -u bridge-utils-1.5/debian/ifupdown.sh bridge-utils-1.5/debian/ifupdown.sh --- bridge-utils-1.5/debian/ifupdown.sh +++ bridge-utils-1.5/debian/ifupdown.sh @@ -28,6 +28,9 @@ # Previous work (create the interface) if [ "$MODE" = "start" ] && [ ! -d /sys/class/net/$IFACE ]; then brctl addbr $IFACE || exit 1 + if [ "$IF_BRIDGE_HW" ]; then + ip link set dev $IFACE address $IF_BRIDGE_HW + fi # Wait for the ports to become available if [ "$IF_BRIDGE_WAITPORT" ] then @@ -68,7 +71,14 @@ fi if [ "$IF_BRIDGE_HW" ] then - ip link set dev $port address $IF_BRIDGE_HW + KVER="$(uname -r)" + LKVER="${KVER#*.}" + LKVER="${LKVER%%-*}" + LKVER="${LKVER%%.*}" + if [ "${KVER%%.*}" -lt 3 -o "${KVER%%.*}" -eq 3 -a "$LKVER" -lt 3 ] + then + ip link set dev $port address $IF_BRIDGE_HW + fi fi if [ -f /proc/sys/net/ipv6/conf/$port/disable_ipv6 ] then reverted: --- bridge-utils-1.5/debian/viejo +++ bridge-utils-1.5.orig/debian/viejo @@ -1,210 +0,0 @@ -#!/bin/sh - -# You don't usually need to touch this file at all, the full configuration -# of the bridge can be done in a standard way on /etc/network/interfaces. - -# Have a look at /usr/share/doc/bridge-utils/README.Debian if you want -# more info about the way on wich a bridge is set up on Debian. - -if [ ! -x /sbin/brctl ] -then - exit 0 -fi - -. /lib/bridge-utils/bridge-utils.sh - -case "$IF_BRIDGE_PORTS" in - "") - exit 0 - ;; - none) - INTERFACES="" - ;; - *) - INTERFACES="$IF_BRIDGE_PORTS" - ;; -esac - -# Previous work (create the interface) -if [ "$MODE" = "start" ] && [ ! -d /sys/class/net/$IFACE ]; then - brctl addbr $IFACE || exit 1 -# Wait for the ports to become available - if [ "$IF_BRIDGE_WAITPORT" ] - then - set x $IF_BRIDGE_WAITPORT && - shift && - WAIT="$1" && - shift && - WAITPORT="$@" && - if [ -z "$WAITPORT" ];then WAITPORT="$IF_BRIDGE_PORTS";fi && - STARTTIME=$(date +%s) && - NOTFOUND="true" && - /bin/echo -e "\nWaiting for a max of $WAIT seconds for $WAITPORT to become available." && - while [ "$(($(date +%s)-$STARTTIME))" -le "$WAIT" ] && [ -n "$NOTFOUND" ] - do - NOTFOUND="" - for i in $WAITPORT - do - if ! grep -q "^[\ ]*$i:.*$" /proc/net/dev;then NOTFOUND="true";fi - done - if [ -n "$NOTFOUND" ];then sleep 1;fi - done - fi -# Previous work (stop the interface) -elif [ "$MODE" = "stop" ]; then - ip link set dev $IFACE down || exit 1 -fi - -all_interfaces= && -unset all_interfaces && -bridge_parse_ports $INTERFACES | while read i -do - for port in $i - do - # We attach and configure each port of the bridge - if [ "$MODE" = "start" ] && [ ! -d /sys/class/net/$IFACE/brif/$port ]; then - if [ -x /etc/network/if-pre-up.d/vlan ]; then - env IFACE=$port /etc/network/if-pre-up.d/vlan - fi - if [ "$IF_BRIDGE_HW" ] - then - ip link set dev $port address $IF_BRIDGE_HW - fi - if [ -f /proc/sys/net/ipv6/conf/$port/disable_ipv6 ] - then - echo 1 > /proc/sys/net/ipv6/conf/$port/disable_ipv6 - fi - brctl addif $IFACE $port && ip link set dev $port up - # We detach each port of the bridge - elif [ "$MODE" = "stop" ] && [ -d /sys/class/net/$IFACE/brif/$port ]; then - ip link set dev $port down && brctl delif $IFACE $port && \ - if [ -x /etc/network/if-post-down.d/vlan ]; then - env IFACE=$port /etc/network/if-post-down.d/vlan - fi - if [ -f /proc/sys/net/ipv6/conf/$port/disable_ipv6 ] - then - echo 0 > /proc/sys/net/ipv6/conf/$port/disable_ipv6 - fi - fi - done -done - -# We finish setting up the bridge -if [ "$MODE" = "start" ] ; then - - if [ "$IF_BRIDGE_AGEING" ] - then - brctl setageing $IFACE $IF_BRIDGE_AGEING - fi - - if [ "$IF_BRIDGE_BRIDGEPRIO" ] - then - brctl setbridgeprio $IFACE $IF_BRIDGE_BRIDGEPRIO - fi - - if [ "$IF_BRIDGE_FD" ] - then - brctl setfd $IFACE $IF_BRIDGE_FD - fi - - if [ "$IF_BRIDGE_GCINT" ] - then - brctl setgcint $IFACE $IF_BRIDGE_GCINT - fi - - if [ "$IF_BRIDGE_HELLO" ] - then - brctl sethello $IFACE $IF_BRIDGE_HELLO - fi - - if [ "$IF_BRIDGE_MAXAGE" ] - then - brctl setmaxage $IFACE $IF_BRIDGE_MAXAGE - fi - - if [ "$IF_BRIDGE_PATHCOST" ] - then - brctl setpathcost $IFACE $IF_BRIDGE_PATHCOST - fi - - if [ "$IF_BRIDGE_PORTPRIO" ] - then - brctl setportprio $IFACE $IF_BRIDGE_PORTPRIO - fi - - if [ "$IF_BRIDGE_STP" ] - then - brctl stp $IFACE $IF_BRIDGE_STP - fi - - - # We activate the bridge - ip link set dev $IFACE up - - - # Calculate the maximum time to wait for the bridge to be ready - if [ "$IF_BRIDGE_MAXWAIT" ] - then - MAXWAIT=$IF_BRIDGE_MAXWAIT - else - MAXWAIT=$(brctl showstp $IFACE 2>/dev/null|sed -n 's/^.*forward delay[ \t]*\(.*\)\..*bridge forward delay[ \t]*\(.*\)\..*$/\1 \2/p') - if [ "$MAXWAIT" ] - then - if [ ${MAXWAIT% *} -gt ${MAXWAIT#* } ] - then - MAXWAIT=$((2*(${MAXWAIT% *}+1))) - else - MAXWAIT=$((2*(${MAXWAIT#* }+1))) - fi - else - if [ "$IF_BRIDGE_FD" ] - then - MAXWAIT=$((2*(${IF_BRIDGE_FD%.*}+1))) - else - MAXWAIT=32 - fi - /bin/echo -e "\nWaiting $MAXWAIT seconds for $IFACE to get ready." - sleep $MAXWAIT - MAXWAIT=0 - fi - fi - - - # Wait for the bridge to be ready - if [ "$MAXWAIT" != 0 ] - then - /bin/echo -e "\nWaiting for $IFACE to get ready (MAXWAIT is $MAXWAIT seconds)." - - unset BREADY - unset TRANSITIONED - COUNT=0 - - # Use 0.1 delay if available - sleep 0.1 2>/dev/null && MAXWAIT=$((MAXWAIT * 10)) - - while [ ! "$BREADY" -a $COUNT -lt $MAXWAIT ] - do - sleep 0.1 2>/dev/null || sleep 1 - COUNT=$(($COUNT+1)) - BREADY=true - for i in $(brctl showstp $IFACE|sed -n 's/^.*port id.*state[ \t]*\(.*\)$/\1/p') - do - if [ "$i" = "listening" -o "$i" = "learning" -o "$i" = "forwarding" -o "$i" = "blocking" ] - then - TRANSITIONED=true - fi - if [ "$i" != "forwarding" -a "$i" != "blocking" ] && [ ! "$TRANSITIONED" -o "$i" != "disabled" ] - then - unset BREADY - fi - done - done - - fi - -# Finally we destroy the interface -elif [ "$MODE" = "stop" ]; then - - brctl delbr $IFACE - -fi