From: Guus Sliepen Date: Sat, 9 Apr 2016 16:40:09 +0000 (+0200) Subject: Use SIOCGIFADDR on BSDs that support it. X-Git-Tag: release-1.0.27~3 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=af5b4efd7280e9f975ade97aee77f1265a1a1df3;p=tinc Use SIOCGIFADDR on BSDs that support it. --- diff --git a/src/bsd/device.c b/src/bsd/device.c index 70e0b0b1..653076b1 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -203,6 +203,11 @@ static bool setup_device(void) { #endif } +#ifdef SIOCGIFADDR + if(overwrite_mac) + ioctl(device_fd, SIOCGIFADDR, mymac.x); +#endif + logger(LOG_INFO, "%s is a %s", device, device_info); return true;