Displaying 12 results from an estimated 12 matches for "config_tree".
Did you mean:
config_btree
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 created
again, bu...
2010 Sep 03
1
[PATCH] New '-o' option to configure server or hosts from command line
...*/
+ result = !b->file - !a->file;
+ 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 ch...
2010 Nov 13
3
[PATCH 1/4] Experimental IFF_ONE_QUEUE support for Linux
....
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_tree, "Iff...
2010 Feb 10
0
[PATCH] Use /dev/tap0 by default on BSD if mode != router
...#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);
+ }
if(!g...
2005 Apr 13
3
Patch for tunnelserver mode in protocol_subnet.c
Hello,
Here is a patch for protocol_subnet.c with two modifications :
- in tunnelserver mode, tinc must check subnets in the ".../hosts/owner"
config file, not in "c->config_tree" (which is the configuration
of the meta-connection from which we receive the ADD_SUBNET message).
- this checking can be made before the check of the owner, especially
before any "new_node" call.
Thanks,
--
Thomas NOEL <thomas.noel@auf.org> http://www.auf.org/
Coordin...
2010 Sep 17
1
friend of a friend type darknets
...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/src/protocol...
2015 Jul 02
1
[PATCH 1/2] (read|append)_config_file: log open errors as LOG_DEBUG
...log level to LOG_DEBUG so
syslog doesn't get filled by default.
---
src/conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf.c b/src/conf.c
index 2b32359..7756247 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -298,7 +298,7 @@ bool read_config_file(splay_tree_t *config_tree, const char *fname) {
fp = fopen(fname, "r");
if(!fp) {
- logger(DEBUG_ALWAYS, LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno));
+ logger(DEBUG_ALWAYS, LOG_DEBUG, "Cannot open config file %s: %s", fname, strerror(errno));
return false;
}...
2009 May 27
0
[PATCH] src/linux/device.c: Fix segfault when running without `--net'.
...--
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
...< 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)) {
2013 Nov 07
2
Segfaults on connection loss
...0, outcompression =
0, mychallenge = 0x0, hischallenge = 0x0, buffer = "...", buflen = 0,
reqlen = 0, tcplen = 0, allow_request = 0, outbuf = 0x1ab75d0 "0 ...
17\n", outbufstart = 0, outbuflen = 0, outbufsize = 14, last_ping_time =
1383624085, last_flushed_time = 1383624085, config_tree = 0x1abb580}
(gdb) p c->status.remove
$3 = 1
(gdb) p now
$4 = 1383624087
(gdb) p pingtimeout
$5 = 2
It seems as if something else already cleaned up the connection, also
c->status.remove == 1, but we still got to line 263.
Another:
Program terminated with signal 11, Segmentation fault....
2012 Apr 02
4
What I need to install Tinc 1.1pre2?
Hi to everybody,
Can anybody tell me what packages I need to install Tinc 1.1pre2 in a server that it had installed a previous version installed?
I tried to install it and when I execute the "make" it give me a lot of errors.
Best regards,
Ramses
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