diff -u vlan-1.9/debian/changelog vlan-1.9/debian/changelog --- vlan-1.9/debian/changelog +++ vlan-1.9/debian/changelog @@ -1,3 +1,11 @@ +vlan (1.9-3ubuntu10.1) trusty; 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 Thu, 08 Sep 2016 12:47:31 -0400 + vlan (1.9-3ubuntu10) trusty; urgency=medium * Only create VLANs for the interface we are processing. (LP: #1295371) 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 @@ -43,6 +43,14 @@ ;; esac +if [ -n "$IF_MTU" -a -n "$IF_VLAN_RAW_DEVICE" ]; then + CUR_DEV_MTU=`cat /sys/class/net/$IF_VLAN_RAW_DEVICE/mtu` + # increase the vlan raw device mtu if needed + if [ -n "$CUR_DEV_MTU" ] && [ $CUR_DEV_MTU -lt $IF_MTU ]; then + ip link set dev $IF_VLAN_RAW_DEVICE mtu $IF_MTU + fi +fi + if [ -n "$IF_VLAN_RAW_DEVICE" ] && [ ! -d /sys/class/net/$IFACE ]; then if [ ! -x /sbin/vconfig ]; then exit 0