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

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