projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use usleep() instead of sleep(), MinGW complained.
[tinc]
/
src
/
linux
/
device.c
diff --git
a/src/linux/device.c
b/src/linux/device.c
index
6c828c0
..
c7c1b65
100644
(file)
--- a/
src/linux/device.c
+++ b/
src/linux/device.c
@@
-28,6
+28,7
@@
#endif
#include "conf.h"
#endif
#include "conf.h"
+#include "device.h"
#include "logger.h"
#include "net.h"
#include "route.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 setup_device(void) {
struct ifreq ifr;
+ bool t1q = false;
if(!get_config_string(lookup_config(config_tree, "Device"), &device))
device = xstrdup(DEFAULT_DEVICE);
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)";
}
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);
if(iface)
strncpy(ifr.ifr_name, iface, IFNAMSIZ);