Displaying 8 results from an estimated 8 matches for "lookup_config".
2010 Nov 13
3
[PATCH 1/4] Experimental IFF_ONE_QUEUE support for Linux
...the interface.
diff --git a/src/linux/device.c b/src/linux/device.c
index 6c828c0..0632d51 100644
--- a/src/linux/device.c
+++ b/src/linux/device.c
@@ -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_tre...
2010 Feb 10
0
[PATCH] Use /dev/tap0 by default on BSD if mode != router
...3,7 @@
#endif
#define DEFAULT_DEVICE "/dev/tun0"
+#define DEFAULT_DEVICE_TAP "/dev/tap0"
typedef enum device_type {
DEVICE_TYPE_TUN,
@@ -60,8 +61,12 @@ static device_type_t device_type = DEVICE_TYPE_TUN;
bool setup_device(void) {
char *type;
- if(!get_config_string(lookup_config(config_tree, "Device"), &device))
- device = xstrdup(DEFAULT_DEVICE);
+ if(!get_config_string(lookup_config(config_tree, "Device"), &device)) {
+ if (routing_mode != RMODE_ROUTER)
+ device = xstrdup(DEFAULT_DEVICE_TAP);
+ else
+ device = xstrdup(DEFAULT_DEVICE);
+...
2015 Oct 18
1
Bug? Tinc does not reread it's host file into config_tree on SIGHUP
Just started building the new network with automatic updates and
noticed a very weird thing: when master tincd was reloaded (which sends
updates), it stopped sending updates.
Debugging session revealed that lookup_config(config_tree, NAME)
returned NULL when NAME was any configuration item from our host file
_after_ SIGHUP. Before it, it returned valid value. I see config_tree
is appended with variables from node's own host file only once, in
setup_myself(). After config reload, config_tree is deleted and creat...
2010 Sep 17
1
friend of a friend type darknets
...ropped.
diff -Nur tinc-1.0.13/src/net_setup.c tinc-1.0.13-patched/src/net_setup.c
--- tinc-1.0.13/src/net_setup.c 2010-04-11 04:34:31.000000000 +0200
+++ tinc-1.0.13-patched/src/net_setup.c 2010-09-17 23:38:05.591481035 +0200
@@ -337,6 +337,10 @@
/* Check some options */
+ get_config_bool(lookup_config(config_tree, "FriendOfAFriend"), &foaf);
+ if(foaf)
+ myself->options |= OPTION_INDIRECT;
+
if(get_config_bool(lookup_config(config_tree, "IndirectData"), &choice) && choice)
myself->options |= OPTION_INDIRECT;
diff -Nur tinc-1.0.13/...
2009 May 27
0
[PATCH] src/linux/device.c: Fix segfault when running without `--net'.
...lant.org>
---
src/linux/device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/linux/device.c b/src/linux/device.c
index 2e44755..4e9591c 100644
--- a/src/linux/device.c
+++ b/src/linux/device.c
@@ -63,7 +63,8 @@ bool setup_device(void)
if(!get_config_string(lookup_config(config_tree, "Interface"), &iface))
#ifdef HAVE_LINUX_IF_TUN_H
- iface = xstrdup(netname);
+ if (netname != NULL)
+ iface = xstrdup(netname);
#else
iface = xstrdup(rindex(device, '/') ? rindex(device, '/') + 1 : device);
#endif
--
1.5.6.5
2006 Jun 01
2
Finding the right interface on FreeBSD
...le (device_fd < 0 && device_nr < DEVICE_TRIES_MAX);
+ if (device_fd >= 0)
+ device = device_buf;
+ }
+ }
+ if (device_fd < 0) {
+ logger(LOG_ERR, _("Could not open %s: %s"), device, strerror(errno));
+ return false;
+ }
}
if(get_config_string(lookup_config(config_tree, "DeviceType"), &type)) {
2010 Sep 03
1
[PATCH] New '-o' option to configure server or hosts from command line
...if (result)
+ return result;
+
result = a->line - b->line;
if(result)
return result;
else
- return strcmp(a->file, b->file);
+ return a->file ? strcmp(a->file, b->file) : 0;
}
void init_configuration(avl_tree_t ** config_tree) {
@@ -87,7 +94,7 @@ config_t *lookup_config(avl_tree_t *config_tree, char
*variable) {
config_t cfg, *found;
cfg.variable = variable;
- cfg.file = "";
+ cfg.file = NULL;
cfg.line = 0;
found = avl_search_closest_greater(config_tree, &cfg);
@@ -233,6 +240,45 @@ static char *readline(FILE * fp, char *buf, size_t
bu...
2007 Jul 21
2
tincctl patches
(Second try to send this. I wonder if the first one gotten eaten by a
spam filter; I'll link to patches instead of attaching them.)
Here are the tincctl patches I've been working on. They apply to
http://www.tinc-vpn.org/svn/tinc/branches/1.1@1545. I intend to commit
them once the crypto stuff's fixed. Since they're basically done, I'm
emailing them now for review and in case