mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 05:04:27 +08:00
Fix panic if interfaces does not have any mac address
This commit is contained in:
parent
d2aa528d0f
commit
97f00aeb8b
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue