]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: skip VLAN devices in fcoe-up
authorHannes Reinecke <hare@suse.de>
Thu, 11 Dec 2014 14:46:23 +0000 (15:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 Jun 2016 09:51:05 +0000 (11:51 +0200)
DCB & fipvlan can only be called on real devices, not VLAN
ones. So skip any VLAN devices which might been added to the
list of network interfaces.

References: bnc#878583

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 0a68a26cffad7fc75e454b06206c0bbf297361b7)

modules.d/95fcoe/fcoe-up.sh

index 1d62570ec42a5f84a0f98318ca4627159f0dd3bf..0399affdbeae03e3370a8f8a6fc534f3522ccc32 100755 (executable)
@@ -22,6 +22,14 @@ netif=$1
 dcb=$2
 vlan="yes"
 
+iflink=$(cat /sys/class/net/$netif/iflink)
+ifindex=$(cat /sys/class/net/$netif/ifindex)
+if [ "$iflink" != "$ifindex" ] ; then
+    # Skip VLAN devices
+    exit 0
+fi
+
+ip link set dev $netif up
 linkup "$netif"
 
 netdriver=$(readlink -f /sys/class/net/$netif/device/driver)