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