]> git.meshlink.io Git - meshlink/blobdiff - src/linux/device.c
Fix combination of Mode = router and DeviceType = tap on Linux.
[meshlink] / src / linux / device.c
index 3b3b439df034c4364f0cd0e2b162c1c805242200..127e3e828488c146c380f5db1384eda0edcb9909 100644 (file)
@@ -84,6 +84,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)";