summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2019-01-02 11:03:54 +0100
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2019-01-02 11:03:54 +0100
commit6fcdd7e26bebce0d7b473fda32fc9a69b6a49761 (patch)
tree656b313a2655e0b1da5d57c722d9b0c83cc0c192
parent30b181047dd45507a26aea0d1109d7857b1fb680 (diff)
parente89c9b2e009d5442e98b69e08de60a4b3f8930ec (diff)
Merge branch 'debian' into debian-experimental
-rw-r--r--debian/changelog24
-rw-r--r--debian/control4
-rw-r--r--debian/network/if-post-down.d/vlan8
-rw-r--r--debian/network/if-pre-up.d/vlan32
-rw-r--r--debian/network/if-up.d/ip2
5 files changed, 61 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog
index fc8a265..2015ad2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,30 @@ vlan (2.0) experimental; urgency=medium
-- Andreas Henriksson <andreas@fatal.se> Wed, 06 Jan 2016 18:42:14 +0100
+vlan (1.9-3.4) unstable; urgency=medium
+
+ * Merge a change from Ubuntu:
+ - Support biosdevname interface names out of the box (LP: #948559).
+ * Update Vcs-*.
+
+ -- Andrej Shadura <andrewsh@debian.org> Thu, 02 Aug 2018 14:10:52 +0200
+
+vlan (1.9-3.3) unstable; urgency=medium
+
+ [ Stéphane Graber ]
+ * 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.
+
+ [ Dan Streetman ]
+ * 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)
+ * Allow ip-rp-filter to be 0, 1, or 2 instead of only 0 or 1
+ (LP: #1716964)
+
+ -- Andrew Shadura <andrewsh@debian.org> Sun, 26 Nov 2017 10:58:34 +0000
+
vlan (1.9-3.2) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/control b/debian/control
index 96f8b65..e5cce83 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,8 @@ Maintainer: Ard van Breemen <ard@kwaak.net>
Uploaders: Loic Minier <lool@dooz.org>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.6
-XS-Vcs-Git: git://git.debian.org/git/collab-maint/vlan.git
-XS-Vcs-Browser: http://git.debian.org/?p=collab-maint/vlan.git
+Vcs-Git: https://salsa.debian.org/debian/vlan.git
+Vcs-Browser: https://salsa.debian.org/debian/vlan
Package: vlan
Architecture: any
diff --git a/debian/network/if-post-down.d/vlan b/debian/network/if-post-down.d/vlan
index d2cb50a..f2cd58e 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 8659bae..f1db277 100644
--- a/debian/network/if-pre-up.d/vlan
+++ b/debian/network/if-pre-up.d/vlan
@@ -25,6 +25,27 @@ case "$IFACE" in
[ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0
#vconfig set_name_type DEV_PLUS_VID
mkdir -p "$STATEDIR" && echo "DEV_PLUS_VID" > "$STATEDIR/name-type"
+ 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
+ mkdir -p "$STATEDIR" && echo "DEV_PLUS_VID_NO_PAD" > "$STATEDIR/name-type"
+ 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
+ [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0
+ #vconfig set_name_type DEV_PLUS_VID
+ mkdir -p "$STATEDIR" && echo "DEV_PLUS_VID" > "$STATEDIR/name-type"
+ VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"`
+ ;;
+ *.*)
+ # Silently ignore interfaces which we do not (know how to) support
[ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0
#vconfig set_name_type DEV_PLUS_VID_NO_PAD
mkdir -p "$STATEDIR" && echo "DEV_PLUS_VID_NO_PAD" > "$STATEDIR/name-type"
@@ -36,10 +57,15 @@ case "$IFACE" in
;;
esac
-if [ -n "$IF_VLAN_RAW_DEVICE" ]; then
- if [ ! -x $(which ip) ]; then
- exit 0
+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 ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null; then
echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE"
exit 1
diff --git a/debian/network/if-up.d/ip b/debian/network/if-up.d/ip
index d7de05c..c155a7a 100644
--- a/debian/network/if-up.d/ip
+++ b/debian/network/if-up.d/ip
@@ -13,6 +13,8 @@ then
if [ -n "$IF_IP_RP_FILTER" ]; then
if [ "$IF_IP_RP_FILTER" -eq "0" ]; then
echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
+ elif [ "$IF_IP_RP_FILTER" -eq "2" ]; then
+ echo 2 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
else
echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
fi