Fix combination of Mode = router and DeviceType = tap on Linux.
[oweals/tinc.git] / src / linux / device.c
index f770f7fade4d15d732100335cfcd84a83702c777..71fedef6fa0080b19fe5d5cd841f5ea5c12ce80a 100644 (file)
@@ -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)";