diff options
author | Eric Desrochers <eric.desrochers@canonical.com> | 2018-05-15 20:14:30 +0000 |
---|---|---|
committer | Andrej Shadura <andrew.shadura@collabora.co.uk> | 2018-08-02 13:58:28 +0200 |
commit | 3db16ccdeb3d8c93f56fbe1e4bf7b08d0d71beb0 (patch) | |
tree | f7f777971c22915dda0f492236cafb15c97e215a /debian/network/if-pre-up.d/vlan | |
parent | f2f33a15b1b4b5d09dcdbdbced0b20507a7fb07f (diff) | |
parent | 4f46208e18b7fa96ce0e38894c15616e1dd949de (diff) |
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.
Diffstat (limited to 'debian/network/if-pre-up.d/vlan')
-rw-r--r-- | debian/network/if-pre-up.d/vlan | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/debian/network/if-pre-up.d/vlan b/debian/network/if-pre-up.d/vlan index c266e5b..9fcdd2b 100644 --- a/debian/network/if-pre-up.d/vlan +++ b/debian/network/if-pre-up.d/vlan @@ -16,11 +16,17 @@ case "$IFACE" in VLANID=`echo $IFACE|sed "s/vlan0*//"` ;; 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*//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*.*|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;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/"` @@ -60,9 +66,8 @@ if [ -n "$IF_VLAN_RAW_DEVICE" ] && [ ! -d /sys/class/net/$IFACE ]; then exit 1 fi if [ ! -e "/sys/class/net/$IFACE" ]; then - # Try ifup for the raw device, if it fails then bring it up directly - # this is required e.g. there is no configuration for the raw device - ifup $IF_VLAN_RAW_DEVICE || ip link set up dev $IF_VLAN_RAW_DEVICE + # 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 fi |