ne2k: forces mac address translation even when machine loaded from state#1562
ne2k: forces mac address translation even when machine loaded from state#1562internet-exploder wants to merge 1 commit into
Conversation
I cannot reproduce this, can you explain how to reproduce it and what is being fixed by this? |
Actually the way I caught this: I made custom relay server which responds to DHCP requests and logs new mac addresses and their leases to stdout, and booting from same state in different browsers was giving same mac address to the relay side, which was not what I wanted. So I figured out when mac addr translation is enabled it seems to rewrite a known mac addr to randomly generated one, however "known" mac addr picked from outside ne2k interface was wrong (in guest vm it was old mac from the snapshot state). The solution I've found is to forcefully rewrite any mac address that comes out of the VM. In theory that may be not very good if we're running router or nested vm, but in that case people won't be using mac addr translation feature anyway! A bit more clarification: in my initial post I mention emu.v86.cpu.devices.net.mac emu is emulation instance, I made it global like so: window.emu = new V86(...). Then put those two lines into inspector js console and it shows those macs. Inside the VM I do "ipconfig /all" to see mac addr which was different from both of them. |
hey man great software, thank you. I've noticed when I'm loading win2k from state, then detected mac addr outside of the vm is different from what it really is inside the VM.
I was checking like this:
emu.v86.cpu.devices.net.mac
emu.v86.cpu.devices.net.mac_address_in_state
they were both different from what was inside win2k vm loaded from a state.
This PR forces any mac to be translated.