Use auto-clone device /dev/{tun,tap} as default on FreeBSD/DragonFly
[tinc] / src / bsd / device.c
index 0eeee6e..86b4f1c 100644 (file)
 #include <net/if_utun.h>
 #endif
 
+#if defined(HAVE_FREEBSD) || defined(HAVE_DRAGONFLY)
+#define DEFAULT_TUN_DEVICE "/dev/tun"  // Use the autoclone device
+#define DEFAULT_TAP_DEVICE "/dev/tap"
+#else
 #define DEFAULT_TUN_DEVICE "/dev/tun0"
 #define DEFAULT_TAP_DEVICE "/dev/tap0"
+#endif
 
 typedef enum device_type {
        DEVICE_TYPE_TUN,