mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-28 16:29:42 +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
|
#endif
|
||||||
|
|
||||||
// Get Ethernet address
|
// 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
|
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[0] = 0xfe;
|
||||||
ether_addr[1] = 0xfd;
|
ether_addr[1] = 0xfd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user