Blame SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch

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