X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Flinux%2Fdevice.c;h=3c609017e06a63a07817f2b7691ec83748d4e112;hp=5ae89478c44254e36ca25c05e147259ad108c6db;hb=9f4390f5708fa31eb0afa3f5cf45eac80d7b458c;hpb=0a84f9cb8f52f2d2b4f03a5ad5ef9dfcd3509033 diff --git a/src/linux/device.c b/src/linux/device.c index 5ae89478..3c609017 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -1,7 +1,7 @@ /* device.c -- Interaction with Linux ethertap and tun/tap device Copyright (C) 2001-2005 Ivo Timmermans, - 2001-2012 Guus Sliepen + 2001-2013 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -94,6 +94,8 @@ static bool setup_device(void) { device_type = DEVICE_TYPE_TUN; device_info = "Linux tun/tap device (tun mode)"; } else { + if (routing_mode == RMODE_ROUTER) + overwrite_mac = true; ifr.ifr_flags = IFF_TAP | IFF_NO_PI; device_type = DEVICE_TYPE_TAP; device_info = "Linux tun/tap device (tap mode)"; @@ -155,6 +157,7 @@ static bool read_packet(vpn_packet_t *packet) { return false; } + memset(packet->data, 0, 12); packet->len = lenin + 10; break; case DEVICE_TYPE_TAP: