rakslice / macemu

Basilisk II and SheepShaver Macintosh emulators
0 stars 0 forks source link

Some more sensible default behaviour for tap device MAC addresses in Windows #62

Closed rakslice closed 3 years ago

rakslice commented 3 years ago

emaculation user afberendsen in the post at https://www.emaculation.com/forum/viewtopic.php?f=20&t=10916 points out that using Windows' built in bridging to bridge tap devices makes it appear to BII/SS that the MAC address of the tap device is the MAC address of the bridge.

It has a hardcoded behaviour to change to the OUI prefix of that MAC address before using it in the emulated NIC; a comment indicates it does this to avoid a conflict with the host.

I've verified locally that the address it ends up using is indeed based on the bridge's MAC address in current builds.

They point out that running multiple instances of BII/SS using tap on the same host machine bridged with Windows' bridging, even with separate tap drivers for each, will lead to an address conflict because they will all use the same bridge MAC address and rewrite it the same way leading to the same address.

Perhaps there's some more sensible way to get past this bridge mac address to the "real" adapter mac address, or otherwise switching to a default that just works like randomizing the mac address.

rakslice commented 3 years ago

Actually, testing I found that the bridge follows the adapters, not the other way around -- and having instances on their own separate tap adapters does correctly use the respective tap adapters' respective generated addresses, so there is no collision.

rakslice commented 3 years ago

This is with the version of tap from OpenVPN that I have installed, 9.24.2.601 in Windows 10 v 2004.

Sleuthing in their source I see there have been changes in the past couple of years, so there may be a new issue.