projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb3c1b8
)
Get MAC of TAP device.
author
Borg
<borg@uu3.net>
Sat, 28 Jun 2014 12:33:07 +0000
(14:33 +0200)
committer
Guus Sliepen
<guus@sliepen.org>
Sat, 28 Jun 2014 20:19:04 +0000
(21:19 +0100)
This fixes initial communication problems since
mymac is NOT properly initialized.
src/linux/device.c
patch
|
blob
|
history
diff --git
a/src/linux/device.c
b/src/linux/device.c
index
66e790a
..
8d042d2
100644
(file)
--- a/
src/linux/device.c
+++ b/
src/linux/device.c
@@
-134,6
+134,9
@@
static bool setup_device(void) {
iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device);
}
+ if(overwrite_mac && !ioctl(device_fd, SIOCGIFHWADDR, &ifr))
+ memcpy(mymac.x, ifr.ifr_hwaddr.sa_data, ETH_ALEN);
+
logger(LOG_INFO, "%s is a %s", device, device_info);
return true;