X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Flinux%2Fdevice.c;h=c7c1b65c67e86b38a5259cd2b18b1173ddba2d23;hp=6c828c01d84f1909ab15ae8093a7ab56c7f71e9e;hb=6d08eb1614b59d5f86a43edda9db06fca72b76cd;hpb=798fa2f04c52b0639713f74b1195847bec40c16a diff --git a/src/linux/device.c b/src/linux/device.c index 6c828c01..c7c1b65c 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -28,6 +28,7 @@ #endif #include "conf.h" +#include "device.h" #include "logger.h" #include "net.h" #include "route.h" @@ -52,6 +53,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 +86,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);