Skip to content

net: give each bridged NFS host its own MAC - #321

Merged
techomancer merged 1 commit into
techomancer:mainfrom
irix7:pr/nfs-host-mac
Oct 25, 2026
Merged

techomancer merged 1 commit into
techomancer:mainfrom
irix7:pr/nfs-host-mac

Conversation

@belikh

@belikh belikh commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

The virtual NFS host uses one fixed link address (02:00:DE:AD:BF:53). Two emulators bridged onto one LAN with different NFS host addresses therefore collide at L2, and a guest's ARP entry can point at the wrong instance.

Derive the last two octets by folding all four address octets, so the address is stable for one host and distinct for hosts whose addresses differ anywhere (including only in the first two octets, which a suffix-only derivation misses).

Evidence — the new test fails on upstream main before the change and passes after:

thread 'net::nfs_pcap::tests::distinct_nfs_hosts_get_distinct_macs' panicked:
assertion `left != right` failed
test result: FAILED. 0 passed; 1 failed

It also asserts the same address always derives the same MAC, the 02:00:DE:AD prefix, and the locally-administered/unicast bits.

Tests: cargo test -p iris --lib net::nfs_pcap — 3 passed.

The virtual NFS host used one fixed 02:00:DE:AD:BF:53 address, so two bridged instances with different NFS subnets collided at L2 and ARP replies could reach the wrong host. Fold all four address octets into the last two, which keeps the address stable for one host and separates subnets even when only the first two octets differ. The new test fails on the fixed suffix and passes with the derivation.
belikh added a commit to irix7/iris that referenced this pull request Oct 25, 2026
Cache default reverted (e7a7f62), VCE branch confirmed already converged, REX3 aux-clear test and NFS host-MAC fix opened as upstream techomancer#320/techomancer#321.
@techomancer
techomancer merged commit 610863c into techomancer:main Oct 25, 2026
7 checks passed
belikh added a commit to irix7/iris that referenced this pull request Oct 25, 2026
techomancer#319, techomancer#320 and techomancer#321 are merged upstream and merged back; the send queue is renumbered around them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants