Skip to content

Commit 6c48623

Browse files
author
Zhang Wenhao
committed
<fix>[utils]: correct CPU model and MAC retrieval in license check
This patch is for zsv_4.10.28; This patch is cherry-picked from ZSTAC-79487, see commit bd5f6d6. Resolves: ZSV-11252 Change-Id: I646379678a7923767067706e7a6e667a796f686d
1 parent f20937f commit 6c48623

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

utils/src/main/java/org/zstack/utils/network/NetworkUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ public static List<String> getFreeIpv6InRange(String startIp, String endIp, List
532532
}
533533

534534
public static List<String> getAllMac() {
535-
ShellResult res = ShellUtils.runAndReturn("ip a | awk '/ether/ {print $2}' | sort -u");
535+
ShellResult res = ShellUtils.runAndReturn("ip a | awk '/link\\// && !/loopback/ {print $2}' | sort -u");
536536

537537
if (!res.isReturnCode(0)) {
538538
throw new RuntimeException("Fail to get mac address");

0 commit comments

Comments
 (0)