Commit 338eb19b authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Ignore null MAC addresses.

parent 7d98e134
......@@ -80,8 +80,9 @@ if_eui64(char *ifname, int ifindex, unsigned char *eui)
close(s);
mac = (unsigned char *)req.ifr_hwaddr.sa_data;
/* Check not group and global */
if((mac[0] & 1) != 0 || (mac[0] & 2) != 0) {
/* OpenVPN interfaces have a null MAC address. Also check not group
and global */
if(memcmp(mac, zeroes, 6) == 0 || (mac[0] & 1) != 0 || (mac[0] & 2) != 0) {
errno = ENOENT;
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment