Blame 0062-95fcoe-skip-VLAN-devices-in-fcoe-up.patch

Harald Hoyer b94732
From 0a68a26cffad7fc75e454b06206c0bbf297361b7 Mon Sep 17 00:00:00 2001
Harald Hoyer b94732
From: Hannes Reinecke <hare@suse.de>
Harald Hoyer b94732
Date: Thu, 11 Dec 2014 15:46:23 +0100
Harald Hoyer b94732
Subject: [PATCH] 95fcoe: skip VLAN devices in fcoe-up
Harald Hoyer b94732
Harald Hoyer b94732
DCB & fipvlan can only be called on real devices, not VLAN
Harald Hoyer b94732
ones. So skip any VLAN devices which might been added to the
Harald Hoyer b94732
list of network interfaces.
Harald Hoyer b94732
Harald Hoyer b94732
References: bnc#878583
Harald Hoyer b94732
Harald Hoyer b94732
Signed-off-by: Hannes Reinecke <hare@suse.de>
Harald Hoyer b94732
Signed-off-by: Thomas Renninger <trenn@suse.de>
Harald Hoyer b94732
---
Harald Hoyer b94732
 modules.d/95fcoe/fcoe-up.sh | 8 ++++++++
Harald Hoyer b94732
 1 file changed, 8 insertions(+)
Harald Hoyer b94732
Harald Hoyer b94732
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
Harald Hoyer b94732
index b9d0411..7f6eb1b 100755
Harald Hoyer b94732
--- a/modules.d/95fcoe/fcoe-up.sh
Harald Hoyer b94732
+++ b/modules.d/95fcoe/fcoe-up.sh
Harald Hoyer b94732
@@ -16,6 +16,14 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
Harald Hoyer b94732
 netif=$1
Harald Hoyer b94732
 dcb=$2
Harald Hoyer b94732
 
Harald Hoyer b94732
+iflink=$(cat /sys/class/net/$netif/iflink)
Harald Hoyer b94732
+ifindex=$(cat /sys/class/net/$netif/ifindex)
Harald Hoyer b94732
+if [ "$iflink" != "$ifindex" ] ; then
Harald Hoyer b94732
+    # Skip VLAN devices
Harald Hoyer b94732
+    exit 0
Harald Hoyer b94732
+fi
Harald Hoyer b94732
+
Harald Hoyer b94732
+ip link set dev $netif up
Harald Hoyer b94732
 linkup "$netif"
Harald Hoyer b94732
 
Harald Hoyer b94732
 netdriver=$(readlink -f /sys/class/net/$netif/device/driver)