-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netlink.LinkSetMaster() arbitrarily changes MAC addresses #553
Comments
I expect that it's the Linux kernel which is doing the changes. |
Couldn't find a reference yesterday, sorry, but today I have dozens:
|
I wasn't aware that it's intended functionality for the bridge to change its MAC, especially with the
I can get behind the logic for the bridge, but where is the TAP interfaces changing MACs documented? I've updated https://github.com/twelho/netlinktest accordingly to ignore the bridge's changes and only look at the interfaces being attached to it, the above snippet shows what the issue looks like now. |
I don't believe this is a netlink library issue. I ran into this quite frequently in my early days of linux kernel networking. The tap device changing automatically does seem new. I wonder if there is some newer code in the kernel that is detecting if the mac of the bridge is lower than the tap device and changing it automatically. Your best bet here is to explicitly set the mac of the mac address of one of the devices in the bridge, and then explictly set the mac of the bridge to that value: https://backreference.org/2010/07/28/linux-bridge-mac-addresses-and-dynamic-ports/ |
I'm importing netlink
v1.1.0
to create TAP adapters and a bridge device, and usingnetlink.LinkSetMaster(tapAdapter, bridge)
to bind them together. This operation however results in the MAC addresses of the TAP adapter and the bridge arbitrarily changing, sometimes to the same MAC address which breaks network connectivity.What I've been able to deduce:
netlink.LinkSetMasterByIndex()
as well, and it doesn't matter what handle is used to perform the call.containerd
container in Ignite, seeignite-spawn
container has multiple interfaces with same MAC, networking (randomly) broken weaveworks/ignite#633.I've created a small test binary isolating the issue here: https://github.com/twelho/netlinktest.
Sample output of what I'm seeing:
The text was updated successfully, but these errors were encountered: