diff options
author | nattoheaven <nattoheaven@gmail.com> | 2014-03-12 03:06:21 +0400 |
---|---|---|
committer | nattoheaven <nattoheaven@gmail.com> | 2014-03-12 03:06:21 +0400 |
commit | 4c48388b1235faa91cf377a8d238871cb5184e3b (patch) | |
tree | 6d9196004e0a4f1139e1ab3e42109f4f43651061 /src/Cedar | |
parent | 14e86934210aceb4cd8b68bbfd510f411d231580 (diff) |
Several Tunings for OS X
Diffstat (limited to 'src/Cedar')
-rw-r--r-- | src/Cedar/VLanUnix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Cedar/VLanUnix.c b/src/Cedar/VLanUnix.c index 81182c92..d40235dc 100644 --- a/src/Cedar/VLanUnix.c +++ b/src/Cedar/VLanUnix.c @@ -105,6 +105,9 @@ #include <errno.h>
#include <Mayaqua/Mayaqua.h>
#include <Cedar/Cedar.h>
+#ifdef UNIX_MACOS
+#include <net/ethernet.h>
+#endif
#ifdef OS_UNIX
@@ -524,10 +527,11 @@ int UnixCreateTapDeviceEx(char *name, char *prefix, UCHAR *mac_address) if (mac_address != NULL)
{
- uint8_t macos_mac_address[19];
Zero(&ifr, sizeof(ifr));
StrCpy(ifr.ifr_name, sizeof(ifr.ifr_name), macos_eth_name);
- Copy(&ifr.ifr_addr.sa_data, mac_address, 6);
+ ifr.ifr_addr.sa_len = ETHER_ADDR_LEN;
+ ifr.ifr_addr.sa_family = AF_LINK;
+ Copy(&ifr.ifr_addr.sa_data, mac_address, ETHER_ADDR_LEN);
ioctl(s, SIOCSIFLLADDR, &ifr);
}
|