Experimental IFF_ONE_QUEUE support for Linux
[tinc] / src / linux / device.c
index 6c828c0..0632d51 100644 (file)
@@ -52,6 +52,7 @@ static uint64_t device_total_out = 0;
 
 bool setup_device(void) {
        struct ifreq ifr;
+       bool t1q = false;
 
        if(!get_config_string(lookup_config(config_tree, "Device"), &device))
                device = xstrdup(DEFAULT_DEVICE);
@@ -84,6 +85,12 @@ bool setup_device(void) {
                device_info = "Linux tun/tap device (tap mode)";
        }
 
+#ifdef IFF_ONE_QUEUE
+       /* Set IFF_ONE_QUEUE flag... */
+       if(get_config_bool(lookup_config(config_tree, "IffOneQueue"), &t1q) && t1q)
+               ifr.ifr_flags |= IFF_ONE_QUEUE;
+#endif
+
        if(iface)
                strncpy(ifr.ifr_name, iface, IFNAMSIZ);