mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00
Fix panic if interfaces does not have any mac address
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user