瀏覽代碼

Merge pull request #1493 from Hintay/master

Fix panic if interfaces does not have any mac address
dcarns 3 年之前
父節點
當前提交
a7ff340692
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      netclient/functions/join.go

+ 1 - 1
netclient/functions/join.go

@@ -104,7 +104,7 @@ func JoinNetwork(cfg *config.ClientConfig, privateKey string) error {
 	// Find and set node MacAddress
 	if cfg.Node.MacAddress == "" {
 		macs, err := ncutils.GetMacAddr()
-		if err != nil {
+		if err != nil || len(macs) == 0 {
 			//if macaddress can't be found set to random string
 			cfg.Node.MacAddress = ncutils.MakeRandomString(18)
 		} else {