If the network interface isn't registered in the backend a call to mac will throw Not_found. This can happen if a previously registered netif has called Vnetif.disconnect and a background process attempts to send more ethernet frames with Ethernet.write. See also discussion in https://github.com/mirage/mirage-tcpip/pull/428
It's not clear what the best way to fail here would be, as the mac function has to return an address or raise an exception. Options to consider:
Return generated mac or a fixed mac -- random mac addresses may be hard to debug in recorded pcap data, and will later most likely cause a new exception in a call to write
Remember original mac even after calls to disconnect/unregister so mac wouldn't fail. This also requires an update to write to drop packets without a valid source
If the network interface isn't registered in the backend a call to
mac
will throwNot_found
. This can happen if a previously registered netif has called Vnetif.disconnect and a background process attempts to send more ethernet frames withEthernet.write
. See also discussion in https://github.com/mirage/mirage-tcpip/pull/428It's not clear what the best way to fail here would be, as the mac function has to return an address or raise an exception. Options to consider:
write
disconnect
/unregister
somac
wouldn't fail. This also requires an update to write to drop packets without a valid source