Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/Cedar
diff options
context:
space:
mode:
authornattoheaven <nattoheaven@gmail.com>2014-03-12 03:06:21 +0400
committernattoheaven <nattoheaven@gmail.com>2014-03-12 03:06:21 +0400
commit4c48388b1235faa91cf377a8d238871cb5184e3b (patch)
tree6d9196004e0a4f1139e1ab3e42109f4f43651061 /src/Cedar
parent14e86934210aceb4cd8b68bbfd510f411d231580 (diff)
Several Tunings for OS X
Diffstat (limited to 'src/Cedar')
-rw-r--r--src/Cedar/VLanUnix.c8
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);
}