Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: ifenslave

ifenslave (2.10ubuntu3) groovy; urgency=medium * Revert 2.10ubuntu1, back to 2.9ubuntu1, as 2.10ubuntu1 is miss-merged. * Do not reintroduce transitional package. -- Dimitri John Ledkov <xnox@ubuntu.com> Wed, 29 Jul 2020 12:10:22 +0100 ifenslave (2.9ubuntu1) bionic; urgency=low * Merge from Debian unstable. Remaining changes: - Upstart event based bond bringup: + Drop ethernet+wifi example + Drop two_ethernet example + Update ethernet+hotplug_wifi example + Update two_hotplug_ethernet example + Update pre-up and post-down scripts for event bringup + Update README.Debian examples - Update scripts to use /run/network/ifstate instead of /etc/network/run/ifstate -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 16 Mar 2018 16:04:23 -0700

Modifications :
  1. Download patch debian/examples/ethernet+wifi

    --- 2.10/debian/examples/ethernet+wifi 2016-09-27 12:23:58.000000000 +0000 +++ 2.10ubuntu3/debian/examples/ethernet+wifi 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -A configuration with one ethernet (wire) interfaces and one wifi interface. - ------8<----------8<----------8<----------8<----------8<----- - -auto bond0 -iface bond0 inet dhcp - bond-slaves eth0 wlan0 - bond-mode 1 - bond-miimon 100 - bond-primary eth0 - -allow-bond0 wlan0 -iface wlan0 inet manual - bond-give-a-chance 10 - wpa-bridge bond0 - wpa-key-mgmt WPA-PSK - wpa-proto WPA - wpa-group CCMP - wpa-ssid my-ssid - wpa-psk "my-secret-password" - ------8<----------8<----------8<----------8<----------8<----- - -You do not need an "iface eth0" stanza. - -The "auto bond0" stanza is required, else bond0 won't be brought up. - -The "allow-bond0 wlan0" stanza is required, to bring wlan0 up together with bond0. - -The "wpa-bridge bond0" stanza is required to inform wpa_supplicant that wifi link-level packets will arrive on bond0, not on wlan0. -The "bond-give-a-chance 10" stanza is required to give a chance for wifi authentication to succeed.
  2. Download patch debian/NEWS

    --- 2.10/debian/NEWS 2018-05-08 20:49:43.000000000 +0000 +++ 2.10ubuntu3/debian/NEWS 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -ifenslave (2.10) UNRELEASED; urgency=medium - - This version of the ifenslave package no longer provides /sbin/ifenslave. The - /sbin/ip command from the iproute2 package supports creating bonding masters - and enslaving other interfaces to it. - - -- Guus Sliepen <guus@debian.org> Tue, 08 May 2018 22:47:07 +0200
  3. Download patch debian/ifenslave.links
  4. Download patch debian/control

    --- 2.10/debian/control 2020-04-26 19:02:57.000000000 +0000 +++ 2.10ubuntu3/debian/control 2020-07-29 11:10:22.000000000 +0000 @@ -1,7 +1,8 @@ Source: ifenslave Section: net Priority: optional -Maintainer: Guus Sliepen <guus@debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Guus Sliepen <guus@debian.org> Uploaders: Dmitry Smirnov <onlyjob@debian.org> Build-Depends: debhelper-compat (= 13) Rules-Requires-Root: no
  5. Download patch debian/examples/two_ethernet

    --- 2.10/debian/examples/two_ethernet 2012-07-13 09:03:40.000000000 +0000 +++ 2.10ubuntu3/debian/examples/two_ethernet 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -A simple configuration with two ethernet (wire) interfaces. - ------8<----------8<----------8<----------8<----------8<----- - -auto bond0 -iface bond0 inet dhcp - bond-slaves eth0 eth1 - bond-mode 1 - bond-miimon 100 - bond-primary eth0 eth1 - ------8<----------8<----------8<----------8<----------8<----- - -You do not need an "iface eth0" nor an "iface eth1" stanza.
  6. Download patch debian/examples/ethernet+hotplug_wifi

    --- 2.10/debian/examples/ethernet+hotplug_wifi 2016-09-27 12:23:58.000000000 +0000 +++ 2.10ubuntu3/debian/examples/ethernet+hotplug_wifi 2016-09-27 22:47:49.000000000 +0000 @@ -2,14 +2,11 @@ A configuration with one ethernet (wire) -----8<----------8<----------8<----------8<----------8<----- -auto bond0 -iface bond0 inet dhcp - bond-slaves eth0 - bond-mode 1 - bond-miimon 100 - bond-primary eth0 +auto eth0 +iface eth0 inet manual + bond-master bond0 -allow-hotplug wlan0 +auto wlan0 iface wlan0 inet manual bond-master bond0 bond-mode 1 @@ -22,6 +19,12 @@ iface wlan0 inet manual wpa-ssid my-ssid wpa-psk "my-secret-password" +auto bond0 +iface bond0 inet dhcp + bond-mode 1 + bond-miimon 100 + bond-primary eth0 wlan0 + -----8<----------8<----------8<----------8<----------8<----- You do not need an "iface eth0" stanza.
  7. Download patch ifenslave

    --- 2.10/ifenslave 1970-01-01 00:00:00.000000000 +0000 +++ 2.10ubuntu3/ifenslave 2016-09-27 22:47:49.000000000 +0000 @@ -0,0 +1,122 @@ +#!/bin/sh + +# Copyright (C) 2012-2013 Guus Sliepen <guus@debian.org> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +version() { + echo 'ifenslave.sh version 2 (2013-05-05)' + echo 'Copyright (c) 2012-2013 Guus Sliepen <guus@debian.org>' + exit 0 +} + +usage() { + echo 'Usage: ifenslave [-acdfhuvV] <master> <slave> ...' + exit 0 +} + +error() { + echo "$@" >&2 + exit 1 +} + +all_interfaces() { + # I guess this was a debugging feature. + ip link show + exit 0 +} + +# Parse options + +while true; do + if [ "$1" = "-a" -o "$1" = "--all-interfaces" ]; then + all_interfaces + elif [ "$1" = "-c" -o "$1" = "--change-active" ]; then + CHANGE_ACTIVE=1; shift + elif [ "$1" = "-d" -o "$1" = "--detach" ]; then + DETACH=1; shift + elif [ "$1" = "-f" -o "$1" = "--force" ]; then + FORCE=1; shift + elif [ "$1" = "-h" -o "$1" = "--help" ]; then + exec man 8 ifenslave + elif [ "$1" = "-u" -o "$1" = "--usage" ]; then + usage + elif [ "$1" = "-v" -o "$1" = "--verbose" ]; then + VERBOSE=1; shift + elif [ "$1" = "-V" -o "$1" = "--version" ]; then + version + elif [ "$1" = "--" ]; then + shift + break + else + break + fi +done + +# Check that we have enough arguments remaining. + +[ -z "$2" ] && error "Not enough arguments" + +master="$1" +shift + +# Check that the master is really a bonding interface. + +[ -d "/sys/class/net/$master" ] || error "$master: no such interface" +[ -d "/sys/class/net/$master/bonding" ] || error "$master: is not a bonding interface" + +# Do we need to change the active interface? + +if [ "$CHANGE_ACTIVE" = 1 ]; then + [ -z "$2" ] || error 'You can only set one interface to be the active slave!' + [ "$VERBOSE" = 1 ] && echo "Changing active slave of $master to $slave" + echo "$1" >"/sys/class/net/$master/bonding/active_slave" || error "$master: could not set $slave to active slave" + exit 0 +fi + +# Otherwise, loop over all slaves and either attach or detach them. + +for slave in "$@"; do + [ -d "/sys/class/net/$slave" ] || error "$slave: no such interface" + + if [ -z "$DETACH" ]; then + if [ -h "/sys/class/net/$master/slave_$slave" ] || + [ -h "/sys/class/net/$master/lower_$slave" ]; then + echo "$slave: already enslaved to $master" >&2 + continue + fi + + read type <"/sys/class/net/$slave/type" + if [ -z "$FORCE" -a "$type" != "1" ]; then + error "$slave: does not appear to be an Ethernet interface (use -f to force)" + fi + + [ "$VERBOSE" = 1 ] && echo "Adding slave $slave to master $master" + ip link set "$slave" down + echo "+$slave" >"/sys/class/net/$master/bonding/slaves" || error "$slave: could not add interface" + else + if [ ! -h "/sys/class/net/$master/slave_$slave" ] && + [ ! -h "/sys/class/net/$master/lower_$slave" ]; then + echo "$slave: is not enslaved to $master" >&2 + continue + fi + + [ "$VERBOSE" = 1 ] && echo "Detaching slave $slave from master $master" + echo "-$slave" >"/sys/class/net/$master/bonding/slaves" || error "$slave: could not detach interface" + fi +done + +exit 0
  8. Download patch debian/ifenslave.install

    --- 2.10/debian/ifenslave.install 1970-01-01 00:00:00.000000000 +0000 +++ 2.10ubuntu3/debian/ifenslave.install 2016-09-27 22:47:49.000000000 +0000 @@ -0,0 +1 @@ +ifenslave sbin/
  9. Download patch debian/ifenslave.if-pre-up
  10. Download patch debian/README.Debian

    --- 2.10/debian/README.Debian 2018-05-08 20:46:20.000000000 +0000 +++ 2.10ubuntu3/debian/README.Debian 2016-09-27 22:47:49.000000000 +0000 @@ -1,18 +1,14 @@ ifenslave for Debian ---------------------- -This package used to provide a program named ifenslave that could be used to -manually configure a bond interface and enslave other interfaces to it. -However, since a while now the "ip" command supports creating a bond interface: +The ifenslave program distributed with the Linux kernel sources has not always +been up to date, and several modified versions have been floating around. The +latest kernels now contain an updated version though, but the best way to +configure bonding is via the files in /sys/class/net/$master/bonding/. This +Debian package therefore does not contain the binary from the kernel sources, +but provides a shell script with identical functionality. - ip link add bond0 type bond - -And enslaving another interface to it: - - ip link set eth1 master bond0 - -This package no longer ships with the program named "ifenslave", it only -provides hooks for ifupdown to support network bonding in several ways: +You can also enslave interfaces using Debian's /etc/network/interfaces file: - You can specify in the stanza of a bonding interface which slaves it has. @@ -34,25 +30,31 @@ A bonding master is defined like this: iface bond0 inet static address 208.77.188.166 ... - bond-slaves eth0 eth1 + bond-primary eth0 eth1 -The "bond-slaves" option can take a list of network interfaces, the keyword -"none" (with obvious results) and the keyword "all" (which selects all -interfaces with "eth" in their name). Additionally you can set bonding options -by adding them to the interface section: +The bonding slaves should then be defined like this: - bond-mode active-backup - bond-primary eth0 +auto eth0 +iface eth0 inet manual + bond-master bond0 -This would run the bonding device in active backup mode with eth0 as primary. +auto eth1 +iface eth1 inet manual + bond-master bond0 -You can also allow regular interfaces to be enslaved, like this: +Previous versions of the package supported specifying the slaves all in the +stanza for the bonding interface, using the "bond-slaves" option. However, +in such a configuration there is a race condition between bringing up the +hardware driver for the ethernet devices and attempting to bring up the +bonded interface; the bonding interface needs to be initiated from the slave +interfaces instead. -iface eth2 inet manual - bond-master bond0 +You can set additional bonding options by adding them to the interface +section: -The latter can be used in conjunction with allow-hotplug to automatically add -hotplugged interfaces to a bonding interface. + bond-mode active-backup + +This would run the bonding device in active backup mode with eth0 as primary. If the master interface is not available at the time the first slave is setup, it will be created and setup according to bond-* options in the *slave* stanza. @@ -62,10 +64,6 @@ possible slave stanzas. However, there e different options in a different stanza - for example, to change the primary slave when hotpluging a new slave. -Using ifup on a master interface will call ifup for all slaves that are -flagged with allow-bondX. (bondX being replaced by the master interface -name). This will allow for extra setup for special slave interfaces. - Using ifdown on a master interface will cause all slaves to be freed and disabled. The master is also cleaned-up to ensure reliable results if the master is brought up later. @@ -88,14 +86,15 @@ Most of these options are used to write subdirectories of /sys. For the expected effects of writing into bonding-related /sys files, please read -the Linux kernel bonding documentation, which can be found here: - -https://www.kernel.org/doc/Documentation/networking/bonding.txt +the bonding documentation (Documentation/networking/bonding.txt) in the linux +Kernel source tree. If you think that a bond-* option should exist to write into a bonding-related *writable* file in /sys, but no bond-* option exists for that, please report a bug against the ifenslave package. +Last checked for kernel version 2.6.35-rc1. + * bond-active-slave: Write into /sys/class/net/<bond>/bonding/active_slave Also force the slave to be up. @@ -200,9 +199,6 @@ bug against the ifenslave package. be ignored. You must not add a + sign in front of the slave interface names. -* bond-tlb-dynamic-lb: - Write into /sys/class/net/<bond>/bonding/tlb_dynamic_lb - * bond-updelay: Write into /sys/class/net/<bond>/bonding/updelay
  11. Download patch debian/ifenslave.if-post-down

    --- 2.10/debian/ifenslave.if-post-down 2016-09-27 12:23:58.000000000 +0000 +++ 2.10ubuntu3/debian/ifenslave.if-post-down 2016-09-27 22:47:49.000000000 +0000 @@ -62,3 +62,7 @@ for slave in $slaves ; do echo "-$slave" > "$BOND_PARAMS/slaves" 2> /dev/null fi done + +# Remove the master itself +echo "-$IFACE" > /sys/class/net/bonding_masters +rm /run/network/ifenslave.$IFACE
  12. Download patch debian/source/options

    --- 2.10/debian/source/options 1970-01-01 00:00:00.000000000 +0000 +++ 2.10ubuntu3/debian/source/options 2016-09-27 22:47:49.000000000 +0000 @@ -0,0 +1 @@ +compression = "xz"
  13. Download patch debian/examples/two_hotplug_ethernet

    --- 2.10/debian/examples/two_hotplug_ethernet 2020-04-26 18:54:06.000000000 +0000 +++ 2.10ubuntu3/debian/examples/two_hotplug_ethernet 2016-09-27 22:47:49.000000000 +0000 @@ -2,20 +2,18 @@ A configuration with two hotplug etherne -----8<----------8<----------8<----------8<----------8<----- -auto bond0 -iface bond0 inet dhcp - bond-slaves none - bond-mode 1 - bond-miimon 100 - -allow-hotplug eth0 +auto eth0 iface eth0 inet manual bond-master bond0 - bond-primary eth0 eth1 -allow-hotplug eth1 +auto eth1 iface eth1 inet manual bond-master bond0 + +auto bond0 +iface bond0 inet dhcp + bond-mode 1 + bond-miimon 100 bond-primary eth0 eth1 -----8<----------8<----------8<----------8<----------8<-----
  14. Download patch debian/ifenslave.8

    --- 2.10/debian/ifenslave.8 1970-01-01 00:00:00.000000000 +0000 +++ 2.10ubuntu3/debian/ifenslave.8 2016-09-27 22:47:49.000000000 +0000 @@ -0,0 +1,63 @@ +.Dd 2012-07-13 +.Dt IFENSLAVE 8 +.Os "Debian GNU/Linux" +.\" Manual page created by Guus Sliepen <guus@debian.org> +.Sh NAME +.Nm ifenslave +.Nd Attach and detach slave network devices to a bonding device. +.Sh SYNOPSIS +.Nm +.Op Fl acdfhuvV +.Op Fl -all-interfaces +.Op Fl -change-active +.Op Fl -detach +.Op Fl -force +.Op Fl -help +.Op Fl -usage +.Op Fl -verbose +.Op Fl -version +.Ar master +.Ar slave +.No ... +.Sh DESCRIPTION +.Nm +is a tool to attach and detach slave network devices to a bonding device. +A bonding device will act like a normal Ethernet network device to the kernel, +but will send out the packets via the slave devices using a simple round-robin scheduler. +This allows for simple load-balancing, +identical to "channel bonding" or "trunking" techniques used in switches. +.Pp +The kernel must have support for bonding devices for +.Nm +to be useful. +.Sh OPTIONS +.Bl -tag -width indent +.It Fl a, -all-interfaces +Show information about all interfaces. +.It Fl c, -change-active +Change active slave. +.It Fl d, -detach +Removes slave interfaces from the bonding device. +.It Fl f, -force +Force actions to be taken if one of the specified interfaces appears not to belong to an Ethernet device. +.It Fl h, -help +Display a help message and exit. +.It Fl u, -usage +Show usage information and exit. +.It Fl v, -verbose +Print warning and debug messages. +.It Fl V, -version +Show version information and exit. +.El +.Pp +If no options are given, the default action will be to enslave interfaces. +.Sh EXAMPLE +The following example shows how to setup a bonding device and +enslave two real Ethernet devices to it: +.Bd -literal +# modprobe bonding +# ifconfig bond0 192.168.0.1 netmask 255.255.0.0 +# ifenslave bond0 eth0 eth1 +.Ed +.Sh AUTHOR +.An Guus Sliepen Aq guus@debian.org
  15. Download patch debian/ifenslave.manpages

    --- 2.10/debian/ifenslave.manpages 1970-01-01 00:00:00.000000000 +0000 +++ 2.10ubuntu3/debian/ifenslave.manpages 2016-09-27 22:47:49.000000000 +0000 @@ -0,0 +1 @@ +debian/*.8
  1. ifenslave