Package: vlan
Version: 1.9-3.2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch

Dear Maintainer,

The vlan pkg's /etc/network/if-pre-up.d/vlan script currently will bring
up the raw device before creating the vlan interface, using ip link up,
but if the raw device then is ifup'ed after the vlan interface, the raw
device may be taken down and back up, which will remove any vlan routes
or other configuration from the vlan.  This patch instead changes the
script to do a full ifup for the raw device, so that it is fully ready
before the vlan interface is created and configured.

This is created from Ubuntu launchpad bug 1573272:
https://bugs.launchpad.net/ubuntu/+source/vlan/+bug/1573272

In Ubuntu, the attached patch was applied to achieve the following:

  * 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)


Thanks for considering the patch.


-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety-updates
  APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 
'yakkety'), (100, 'yakkety-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-44-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -u vlan-1.9/debian/network/if-pre-up.d/vlan vlan-1.9/debian/network/if-pre-up.d/vlan
--- vlan-1.9/debian/network/if-pre-up.d/vlan
+++ vlan-1.9/debian/network/if-pre-up.d/vlan
@@ -60,7 +60,7 @@
         exit 1
     fi
     if [ ! -e "/sys/class/net/$IFACE" ]; then
-        ip link set up dev $IF_VLAN_RAW_DEVICE
+        ifup $IF_VLAN_RAW_DEVICE
         vconfig add $IF_VLAN_RAW_DEVICE $VLANID
     fi
 fi

Reply via email to