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

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