mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-26 16:05:54 +03:00
[GH-ISSUE #18] random mac address #9
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @acaz on GitHub (Jan 9, 2019).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/18
Hello
I have an issue with mac address randomization ( sorry for my english )
the affair :
a random mac address is correctly generated and affected, but it's impossible to setup an ip address
after boot, no ip address is set. configuration is good
when i try to ifup the interface ( eth0 ) , a have this error :
.. Cannot assign requested address ..
I change the mac address and everything works fine
I found some explanations on the web.
https://askubuntu.com/questions/423530/cant-change-my-mac-address-cant-assign-requested-address
Mac address must be a Locally Administered Unicast MAC Address ( Not sure 100% )
https://www.hellion.org.uk/cgi-bin/randmac.pl?scope=local&type=unicast
Regards
Arnaud
@acaz commented on GitHub (Jan 11, 2019):
I change some code, add : macaddr[0] = (macaddr[0] | 2) & 0xfe )
seems to work
rand.Seed(time.Now().UnixNano())
rand.Read(macaddr)
macaddr[0] = (macaddr[0] | 2) & 0xfe
macAddrUppr := strings.ToUpper(fmt.Sprintf("%v", macaddr))
@ggongaware commented on GitHub (Jan 16, 2019):
Thank you, added your patch the the master branch