From efd52d96bd7454745fe2c2c7e5dac03abb9cf178 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 22 Jan 2019 13:36:19 -0800 Subject: [PATCH] ETHER: Explicitly allow MAC address to be the host interface MAC address A warning will be issued unless an attach is done with the -Q switch. --- sim_ether.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sim_ether.c b/sim_ether.c index fe612e88..ffdc75ed 100644 --- a/sim_ether.c +++ b/sim_ether.c @@ -2609,6 +2609,11 @@ return SCPE_OK; t_stat eth_check_address_conflict (ETH_DEV* dev, ETH_MAC* const mac) { +char mac_string[32]; + +eth_mac_fmt(mac, mac_string); +if (0 == memcmp (mac, dev->host_nic_phy_hw_addr, sizeof *mac)) + return sim_messagef (SCPE_OK, "Sharing the host NIC MAC address %s may cause unexpected behavior\n", mac_string); return eth_check_address_conflict_ex (dev, mac, NULL, FALSE); }