Experimental IFF_ONE_QUEUE support for Linux
This commit is contained in:
parent
9e3ca39773
commit
3f410e2f8f
2 changed files with 10 additions and 0 deletions
|
@ -255,6 +255,9 @@ a lookup if your DNS server is not responding.
|
||||||
This does not affect resolving hostnames to IP addresses from the
|
This does not affect resolving hostnames to IP addresses from the
|
||||||
host configuration files.
|
host configuration files.
|
||||||
|
|
||||||
|
.It Va IffOneQueue Li = yes | no Po no Pc Bq experimental
|
||||||
|
(Linux only) Set IFF_ONE_QUEUE flag on TUN/TAP devices.
|
||||||
|
|
||||||
.It Va Interface Li = Ar interface
|
.It Va Interface Li = Ar interface
|
||||||
Defines the name of the interface corresponding to the virtual network device.
|
Defines the name of the interface corresponding to the virtual network device.
|
||||||
Depending on the operating system and the type of device this may or may not actually set the name of the interface.
|
Depending on the operating system and the type of device this may or may not actually set the name of the interface.
|
||||||
|
|
|
@ -52,6 +52,7 @@ static uint64_t device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void) {
|
bool setup_device(void) {
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
bool t1q = false;
|
||||||
|
|
||||||
if(!get_config_string(lookup_config(config_tree, "Device"), &device))
|
if(!get_config_string(lookup_config(config_tree, "Device"), &device))
|
||||||
device = xstrdup(DEFAULT_DEVICE);
|
device = xstrdup(DEFAULT_DEVICE);
|
||||||
|
@ -84,6 +85,12 @@ bool setup_device(void) {
|
||||||
device_info = "Linux tun/tap device (tap mode)";
|
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)
|
if(iface)
|
||||||
strncpy(ifr.ifr_name, iface, IFNAMSIZ);
|
strncpy(ifr.ifr_name, iface, IFNAMSIZ);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue