Merge pull request #872 from gravitl/hotfix_v0.11.1_macaddress_unique

random ID for comms nodes
This commit is contained in:
Alex Feiszli 2022-03-07 21:15:46 -05:00 committed by GitHub
commit 21de73cc56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,11 +97,10 @@ func JoinNetwork(cfg config.ClientConfig, privateKey string, iscomms bool) error
privateKey = wgPrivatekey.String()
cfg.Node.PublicKey = wgPrivatekey.PublicKey().String()
}
// Find and set node MacAddress
if cfg.Node.MacAddress == "" {
macs, err := ncutils.GetMacAddr()
if err != nil {
if err != nil || iscomms {
//if macaddress can't be found set to random string
cfg.Node.MacAddress = ncutils.MakeRandomString(18)
} else {