mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-07 12:32:21 +00:00
Merge pull request #157 from dcoshea/issue-154
Avoid an all-zero Ethernet/MAC address when using TUN/TAP (fixes #154).
This commit is contained in:
commit
461332cbf7
@ -371,7 +371,7 @@ bool ether_init(void)
|
||||
#endif
|
||||
|
||||
// Get Ethernet address
|
||||
if (net_if_type == NET_IF_ETHERTAP) {
|
||||
if (net_if_type == NET_IF_ETHERTAP || net_if_type == NET_IF_TUNTAP) {
|
||||
pid_t p = getpid(); // If configured for multicast, ethertap requires that the lower 32 bit of the Ethernet address are our PID
|
||||
ether_addr[0] = 0xfe;
|
||||
ether_addr[1] = 0xfd;
|
||||
|
Loading…
Reference in New Issue
Block a user