Skip to content

Accept all MAC changes from the VM#769

Merged
byteocean merged 1 commit intomainfrom
fix/always_update_vm_mac
Mar 19, 2026
Merged

Accept all MAC changes from the VM#769
byteocean merged 1 commit intomainfrom
fix/always_update_vm_mac

Conversation

@PlagueCZ
Copy link
Copy Markdown
Contributor

Fixes #768

In a previous PR #714 I changed the behavior of MAC address discovery for the VM.

The idea was to only update the MAC once, so prevent unnecessary memory copy.

I knew that the user can change a MAC manually in the VM, but that was really not a concern.

What I missed though is the fact, that iPXE and systemd both use different MAC address:

  1. There is the MAC address of the VF (can be seen on host)
  2. iPXE starts the VM and requests DHCP - with the VF's original MAC
  3. iPXE downloads kernel, initramfs and squashfs and starts the image
  4. systemd starts DHCP but due to MACAddressPolicy=persistent in /usr/lib/systemd/network/99-default.link it generates a new MAC
  5. dpservice refuses to update it because of PR Feature/vf mac change func #714
  6. kernel drops all incoming traffic due to MAC mismatch

I was able to make this happen on many host machine reboots. After applying this PR I am unable to do it

@github-actions github-actions Bot added size/S bug Something isn't working labels Mar 19, 2026
@PlagueCZ PlagueCZ marked this pull request as ready for review March 19, 2026 03:09
@PlagueCZ PlagueCZ requested a review from a team as a code owner March 19, 2026 03:09
@PlagueCZ PlagueCZ force-pushed the fix/always_update_vm_mac branch from 2d9c4fe to 16dfad5 Compare March 19, 2026 14:58
Copy link
Copy Markdown
Contributor

@byteocean byteocean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaining. LGTM.

@byteocean byteocean merged commit 38d5840 into main Mar 19, 2026
6 checks passed
@byteocean byteocean deleted the fix/always_update_vm_mac branch March 19, 2026 15:18
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking bug Something isn't working size/S

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

No VM traffic after host restart

3 participants