|
|
712866 |
From 435af39a0054c2e06ae98a5271c03259e15ba7e6 Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Wed, 29 Jun 2016 16:37:40 +0200
|
|
|
712866 |
Subject: [PATCH] network/net-lib.sh(parse_ifname_opts): support 21 byte MAC
|
|
|
712866 |
addrs
|
|
|
712866 |
|
|
|
712866 |
infiniband MAC addrs are 20 bytes long not 6
|
|
|
712866 |
|
|
|
712866 |
https://bugzilla.redhat.com/show_bug.cgi?id=1319270
|
|
|
712866 |
---
|
|
|
712866 |
modules.d/40network/net-lib.sh | 9 +++++++--
|
|
|
712866 |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
|
712866 |
index 0c00f92..9f76714 100755
|
|
|
712866 |
--- a/modules.d/40network/net-lib.sh
|
|
|
712866 |
+++ b/modules.d/40network/net-lib.sh
|
|
|
712866 |
@@ -523,8 +523,13 @@ parse_ifname_opts() {
|
|
|
712866 |
# udev requires MAC addresses to be lower case
|
|
|
712866 |
ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/')
|
|
|
712866 |
;;
|
|
|
712866 |
+ 21)
|
|
|
712866 |
+ # infiniband MAC addrs are 20 bytes long not 6
|
|
|
712866 |
+ ifname_if=$1
|
|
|
712866 |
+ 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/')
|
|
|
712866 |
+ ;;
|
|
|
712866 |
*)
|
|
|
712866 |
- die "Invalid arguments for ifname="
|
|
|
712866 |
+ die "Invalid arguments for ifname=$1"
|
|
|
712866 |
;;
|
|
|
712866 |
esac
|
|
|
712866 |
|
|
|
712866 |
@@ -533,7 +538,7 @@ parse_ifname_opts() {
|
|
|
712866 |
warn "ifname=$ifname_if uses the kernel name space for interfaces"
|
|
|
712866 |
warn "This can fail for multiple network interfaces and is discouraged!"
|
|
|
712866 |
warn "Please use a custom name like \"netboot\" or \"bluesocket\""
|
|
|
712866 |
- warn "or use biosdevname and no ifname= at all."
|
|
|
712866 |
+ warn "or use the persistent interface names from udev or biosdevname and no ifname= at all."
|
|
|
712866 |
;;
|
|
|
712866 |
esac
|
|
|
712866 |
|