diff options
-rw-r--r-- | debian/changelog | 153 | ||||
-rw-r--r-- | debian/control | 22 | ||||
-rw-r--r-- | debian/network/if-post-down.d/vlan | 8 | ||||
-rw-r--r-- | debian/network/if-pre-up.d/vlan | 13 | ||||
-rw-r--r-- | debian/network/if-up.d/vlan | 8 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
-rw-r--r-- | debian/vlan-network-interface | 45 | ||||
-rw-r--r-- | debian/vlan-udeb.install | 1 | ||||
-rw-r--r-- | debian/vlan.install | 1 | ||||
-rw-r--r-- | debian/vlan.vlan-network-interface.udev | 1 |
10 files changed, 243 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog index 862b1e1..ae9f28e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +vlan (1.9-3.3ubuntu1) cosmic; urgency=low + + * Merge from Debian unstable. Remaining changes: + - In vlan ifupdown pre-up script, instead of calling ip link up for + raw device before creating vlan interface, do a full ifup for raw + device. Otherwise, if raw device processes ifup after vlan device, + the raw device may be taken down and back up, which removes all vlan + routes and other configuration. + - Correct previous patch, to work for ifupdown configuration where a + vlan is configured but the vlan's raw device has no ifupdown config. + - Revert change for lp1573272; instead fix by redesigning when vlan + interfaces are created; after raw-device ifup, not during raw-device + udev processing. + - Add a udeb for vconfig in debian-installer. + - Add udev hook and script for event based bring up. + - Add support for biosdevname + - Revert ifupdown integration as event based bringup is currently + incompatible with the way ifupdown sets up bridges and vlans. + + -- Eric Desrochers <eric.desrochers@canonical.com> Tue, 15 May 2018 20:14:30 +0000 + vlan (1.9-3.3) unstable; urgency=medium [ Stéphane Graber ] @@ -14,6 +35,58 @@ vlan (1.9-3.3) unstable; urgency=medium -- Andrew Shadura <andrewsh@debian.org> Sun, 26 Nov 2017 10:58:34 +0000 +vlan (1.9-3.2ubuntu6) bionic; urgency=medium + + * Revert change for lp1573272; instead fix by redesigning when vlan + interfaces are created; after raw-device ifup, not during raw-device + udev processing. (LP: #1701023) + + -- Dan Streetman <ddstreet@canonical.com> Thu, 19 Apr 2018 18:10:17 -0400 + +vlan (1.9-3.2ubuntu5) artful; urgency=medium + + * Allow ip-rp-filter to be 0, 1, or 2 instead of only 0 or 1 + (LP: #1716964) + + -- Dan Streetman <dan.streetman@canonical.com> Wed, 20 Sep 2017 09:30:21 -0400 + +vlan (1.9-3.2ubuntu4) artful; urgency=medium + + * Correct previous patch, to work for ifupdown configuration where a + vlan is configured but the vlan's raw device has no ifupdown config. + (LP: #1573272) + + -- Dan Streetman <dan.streetman@canonical.com> Mon, 29 May 2017 18:13:27 -0400 + +vlan (1.9-3.2ubuntu3) artful; urgency=medium + + * In vlan ifupdown pre-up script, instead of calling ip link up for + raw device before creating vlan interface, do a full ifup for raw + device. Otherwise, if raw device processes ifup after vlan device, + the raw device may be taken down and back up, which removes all vlan + routes and other configuration. (LP: #1573272) + + -- Dan Streetman <dan.streetman@canonical.com> Thu, 30 Mar 2017 09:16:10 -0400 + +vlan (1.9-3.2ubuntu2) yakkety; urgency=medium + + * If VLAN is configured with higher MTU than raw device MTU, which can + happen if VLAN is ifup'ed before raw device, then increase raw device + MTU first so the VLAN ifup does not fail. (LP: #1224007) + + -- Dan Streetman <dan.streetman@canonical.com> Thu, 08 Sep 2016 12:47:31 -0400 + +vlan (1.9-3.2ubuntu1) utopic; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - Add a udeb for vconfig in debian-installer. + - Add support for biosdevname + - Revert ifupdown integration as event based bringup is currently + incompatible with the way ifupdown sets up bridges and vlans. + - Add udev hook and script for event based bring up. + + -- Stéphane Graber <stgraber@ubuntu.com> Fri, 02 May 2014 18:21:06 -0400 + vlan (1.9-3.2) unstable; urgency=medium * Non-maintainer upload. @@ -30,6 +103,85 @@ vlan (1.9-3.1) unstable; urgency=medium -- Andrew Shadura <andrewsh@debian.org> Sun, 23 Mar 2014 14:42:43 +0100 +vlan (1.9-3ubuntu10) trusty; urgency=medium + + * Only create VLANs for the interface we are processing. (LP: #1295371) + + -- Stéphane Graber <stgraber@ubuntu.com> Thu, 20 Mar 2014 17:48:43 -0400 + +vlan (1.9-3ubuntu9) saucy; urgency=low + + * Transition from iproute to iproute2. + + -- Stéphane Graber <stgraber@ubuntu.com> Mon, 26 Aug 2013 18:35:02 -0400 + +vlan (1.9-3ubuntu8) quantal; urgency=low + + * Revert last chance as udev doesn't accept that syntax. + * Upon closer review of the scripts in the vlan package, I don't actually + believe that the race/deadlock situation found in bridge-utils applies to + vlan as it never waits for an interface to show up or call a script that + would. + + -- Stéphane Graber <stgraber@ubuntu.com> Mon, 10 Sep 2012 11:41:09 -0400 + +vlan (1.9-3ubuntu7) quantal; urgency=low + + * Start vlan-network-interface in the background to avoid blocking the + rest of the udev events (most importantly the upstart one). + (LP: #1003656) + + -- Stéphane Graber <stgraber@ubuntu.com> Fri, 07 Sep 2012 17:24:32 -0400 + +vlan (1.9-3ubuntu6) precise; urgency=low + + * Support biosdevname interface names out of the box (LP: #948559). + + -- Colin Watson <cjwatson@ubuntu.com> Wed, 07 Mar 2012 12:11:55 +0000 + +vlan (1.9-3ubuntu5) precise; urgency=low + + * Now that a vlan interface can be created by a udev hook and + ifupdown checks return codes from the scripts, + make sure to properly deal with an already existing interface. + + -- Stéphane Graber <stgraber@ubuntu.com> Fri, 20 Jan 2012 19:13:23 -0500 + +vlan (1.9-3ubuntu4) precise; urgency=low + + * Add a udev trigger similar to bridge-utils' so vlan interfaces are + created when the parent appears (this will then trigger upstart and + ifupdown to configure the newly created vlan interface) + + -- Stéphane Graber <stgraber@ubuntu.com> Tue, 20 Dec 2011 12:00:44 +0100 + +vlan (1.9-3ubuntu3) lucid; urgency=low + + * debian/control: Make vlan-udeb depend on vlan-modules (kernel modules). + + -- Mathias Gug <mathiaz@ubuntu.com> Wed, 10 Mar 2010 16:37:41 -0500 + +vlan (1.9-3ubuntu2) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack <asac@ubuntu.com> Sun, 07 Mar 2010 01:10:59 +0100 + +vlan (1.9-3ubuntu1) lucid; urgency=low + + * debian/control, debian/vlan-udeb.install: Create vlan-udeb package to + be able to install the vconfig command line in the installer. + (LP: #530468) + + -- Mathias Gug <mathiaz@ubuntu.com> Mon, 01 Mar 2010 18:20:18 -0500 + +vlan (1.9-3build1) karmic; urgency=low + + * No-change rebuild to gain FORTIFY defaults. + + -- Kees Cook <kees@ubuntu.com> Mon, 11 May 2009 12:07:56 -0700 + vlan (1.9-3) unstable; urgency=low * Add XS-Vcs-Git and XS-Vcs-Browser fields to control. @@ -165,3 +317,4 @@ vlan (1.0.4-1) unstable; urgency=low closes:#115791 -- Ard van Breemen <ard@kwaak.net> Mon, 15 Oct 2001 19:06:59 +0200 + diff --git a/debian/control b/debian/control index 4fd484c..124ddb4 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: vlan Section: misc Priority: extra -Maintainer: Ard van Breemen <ard@kwaak.net> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Ard van Breemen <ard@kwaak.net> Uploaders: Loic Minier <lool@dooz.org> Build-Depends: debhelper (>= 5) Standards-Version: 3.7.2 @@ -22,3 +23,22 @@ Description: user mode programs to enable VLANs on your ethernet devices You need a VLAN Linux kernel for this. Linux kernel versions >= 2.4.14 have VLAN support. +Package: vlan-udeb +XC-Package-Type: udeb +Section: debian-installer +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, vlan-modules +XB-Installer-Menu-Item: 99999 +Description: user mode programs to enable VLANs on your ethernet devices + This package contains the user mode programs you need to add and remove + VLAN devices from your ethernet devices. + . + A typical application for a VLAN enabled box is a single wire firewall, + router or load balancer. + . + You need a VLAN Linux kernel for this. Linux kernel versions >= 2.4.14 + have VLAN support. + . + This package provides the vconfig client for use in debian-installer. + diff --git a/debian/network/if-post-down.d/vlan b/debian/network/if-post-down.d/vlan index 73e3dd9..5ef91bd 100644 --- a/debian/network/if-post-down.d/vlan +++ b/debian/network/if-post-down.d/vlan @@ -9,17 +9,17 @@ case "$IFACE" in *:*) exit 0 ;; - eth*.0*|bond*.0*|wlan*.0*) + eth*.0*|bond*.0*|wlan*.0*|em*.0*|p[0-9]*.0*) # Silently ignore interfaces which ifupdown handles on its own # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0 - IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` ;; - eth*.*|bond*.*|wlan*.*) + eth*.*|bond*.*|wlan*.*|em*.*|p[0-9]*.*) # Silently ignore interfaces which ifupdown handles on its own # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0 - IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` ;; # Test for vlan raw device (#196890, #292648) *) diff --git a/debian/network/if-pre-up.d/vlan b/debian/network/if-pre-up.d/vlan index 675d01b..9fcdd2b 100644 --- a/debian/network/if-pre-up.d/vlan +++ b/debian/network/if-pre-up.d/vlan @@ -15,21 +15,21 @@ case "$IFACE" in vconfig set_name_type VLAN_PLUS_VID_NO_PAD VLANID=`echo $IFACE|sed "s/vlan0*//"` ;; - eth*.0*|bond*.0*|wlan*.0*) + eth*.0*|bond*.0*|wlan*.0*|em*.0*|p[0-9]*.0*) # Silently ignore interfaces which ifupdown handles on its own # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0 vconfig set_name_type DEV_PLUS_VID - VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//;s/wlan[0-9][0-9]*\.0*//"` - IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g;s/em[0-9][0-9]*\.0*//g;s/p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` ;; - eth*.*|bond*.*|wlan*.*) + eth*.*|bond*.*|wlan*.*|em*.*|p[0-9]*.*) # Silently ignore interfaces which ifupdown handles on its own # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0 vconfig set_name_type DEV_PLUS_VID_NO_PAD - VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g"` - IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g;s/em[0-9][0-9]*\.0*//g;s/p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` ;; *.0*) # Silently ignore interfaces which we do not (know how to) support @@ -66,6 +66,7 @@ if [ -n "$IF_VLAN_RAW_DEVICE" ] && [ ! -d /sys/class/net/$IFACE ]; then exit 1 fi if [ ! -e "/sys/class/net/$IFACE" ]; then + # we cannot call ifup for the raw-device here, see LP: #1701023 ip link set up dev $IF_VLAN_RAW_DEVICE vconfig add $IF_VLAN_RAW_DEVICE $VLANID fi diff --git a/debian/network/if-up.d/vlan b/debian/network/if-up.d/vlan new file mode 100644 index 0000000..15cf88b --- /dev/null +++ b/debian/network/if-up.d/vlan @@ -0,0 +1,8 @@ +#!/bin/sh + +# after vlan-raw-device interface is ifup'ed, then +# create any associated vlan interfaces +# (LP: #1701032) +if [ -x /lib/udev/vlan-network-interface ]; then + env INTERFACE=$IFACE /lib/udev/vlan-network-interface +fi diff --git a/debian/rules b/debian/rules index 735776c..c2e9dd8 100755 --- a/debian/rules +++ b/debian/rules @@ -5,11 +5,13 @@ CCFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2) binary-arch: dh_testdir dh_testroot + dh_installudev --name vlan-network-interface dh_installdocs -s dh_installman -s dh_installchangelogs -s CHANGELOG dh_install -s chmod -R 755 debian/vlan/etc/network + chmod 755 debian/vlan/lib/udev/vlan-network-interface dh_strip -s dh_fixperms -s dh_compress -s diff --git a/debian/vlan-network-interface b/debian/vlan-network-interface new file mode 100644 index 0000000..ce08eed --- /dev/null +++ b/debian/vlan-network-interface @@ -0,0 +1,45 @@ +#!/bin/sh + +# vlan-network-interface - configure a network bridge +# +# This service checks whether a physical network device that has been added +# has VLAN defined in /etc/network/interfaces that should be brought up +set -e + +if [ -z "$INTERFACE" ]; then + echo "missing \$INTERFACE" >&2 + exit 1 +fi + +if ! which ifquery >/dev/null; then + exit 0 +fi + +if [ ! -x /etc/network/if-pre-up.d/vlan ]; then + exit 0 +fi + +mkdir -p /run/network +for IFACE in $(ifquery --list --allow auto); do + IF_VLAN_RAW_DEVICE=$(ifquery $IFACE | sed -n -e's/^vlan[_-]raw[_-]device: //p') + + # If there is no vlan-raw-device defined, check for vlan-formatted name + # for example, eth1.123 + if [ -z "$IF_VLAN_RAW_DEVICE" ]; then + IF_VLAN_RAW_DEVICE=${IFACE%%.*} + [ "$IFACE" = "$IF_VLAN_RAW_DEVICE" ] && continue + fi + + # Check if this (vlan) $IFACE uses raw-device $INTERFACE + [ "$IF_VLAN_RAW_DEVICE" != "$INTERFACE" ] && continue + + # If we're being called directly from udev, we only want to create the + # vlan interface if there is no associated ifupdown config for the + # raw-device; otherwise the ifup for the raw-device will create the + # vlan interface(s) + [ "$1" = "UDEV" ] && ifquery $IF_VLAN_RAW_DEVICE && continue + + # Create the VLAN interface(s) related to the raw-device interface + export IFACE IF_VLAN_RAW_DEVICE + /etc/network/if-pre-up.d/vlan +done diff --git a/debian/vlan-udeb.install b/debian/vlan-udeb.install new file mode 100644 index 0000000..12642f7 --- /dev/null +++ b/debian/vlan-udeb.install @@ -0,0 +1 @@ +vconfig sbin diff --git a/debian/vlan.install b/debian/vlan.install index c29eacf..6bf49c0 100644 --- a/debian/vlan.install +++ b/debian/vlan.install @@ -1,3 +1,4 @@ debian/network etc +debian/vlan-network-interface lib/udev/ vconfig sbin #macvlan_config sbin diff --git a/debian/vlan.vlan-network-interface.udev b/debian/vlan.vlan-network-interface.udev new file mode 100644 index 0000000..0799fe4 --- /dev/null +++ b/debian/vlan.vlan-network-interface.udev @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="net", RUN+="vlan-network-interface UDEV" |