Skip to content

Commit 6a62586

Browse files
author
gitlab
committed
Merge branch 'zsv-2@@2' into 'zsv_4.10.28'
<fix>[utils]: correct CPU model and MAC retrieval in license check See merge request zstackio/zstack!9069
2 parents f20937f + 6c48623 commit 6a62586

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)