9f65cc
From 7b5182a572c03279b65f0c6abd434edd513e956d Mon Sep 17 00:00:00 2001
9f65cc
From: Thomas Blume <Thomas.Blume@suse.com>
9f65cc
Date: Fri, 7 Aug 2020 08:39:26 +0200
9f65cc
Subject: [PATCH] net-lib.sh: support infiniband network mac addresses
9f65cc
9f65cc
Infiniband MAC addresses have 20 octets.
9f65cc
9f65cc
Reference: bsc#996146
9f65cc
(cherry picked from commit 376ce85105121936666349aa5a777768d52516f7)
9f65cc
9f65cc
Resolves: #1964538
9f65cc
---
9f65cc
 modules.d/40network/net-lib.sh | 5 +++++
9f65cc
 1 file changed, 5 insertions(+)
9f65cc
9f65cc
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
9f65cc
index f0c1c041..128d6343 100755
9f65cc
--- a/modules.d/40network/net-lib.sh
9f65cc
+++ b/modules.d/40network/net-lib.sh
9f65cc
@@ -570,6 +570,11 @@ parse_ifname_opts() {
9f65cc
             # udev requires MAC addresses to be lower case
9f65cc
             ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/')
9f65cc
             ;;
9f65cc
+        21)
9f65cc
+            ifname_if=$1
9f65cc
+            # udev requires MAC addresses to be lower case
9f65cc
+            ifname_mac=$(echo $2:$3:$4:$5:$6:$7:$8:$9:${10}:${11}:${12}:${13}:${14}:${15}:${16}:${17}:${18}:${19}:${20}:${21} | sed 'y/ABCDEF/abcdef/')
9f65cc
+            ;;
9f65cc
         *)
9f65cc
             die "Invalid arguments for ifname="
9f65cc
             ;;
9f65cc