projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
expose traffic stats to 'tinc info ___' and 'tinc dump nodes'
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
314fd71
..
455f66c
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-75,7
+75,7
@@
bool node_read_ecdsa_public_key(node_t *n) {
init_configuration(&config_tree);
init_configuration(&config_tree);
- if(!read_host_config(config_tree, n->name)) {
+ if(!read_host_config(config_tree, n->name
, true
)) {
goto exit;
}
goto exit;
}
@@
-120,7
+120,7
@@
bool read_ecdsa_public_key(connection_t *c) {
if(!c->config_tree) {
init_configuration(&c->config_tree);
if(!c->config_tree) {
init_configuration(&c->config_tree);
- if(!read_host_config(c->config_tree, c->name)) {
+ if(!read_host_config(c->config_tree, c->name
, true
)) {
return false;
}
}
return false;
}
}
@@
-382,7
+382,7
@@
void load_all_nodes(void) {
splay_tree_t *config_tree;
init_configuration(&config_tree);
read_config_options(config_tree, ent->d_name);
splay_tree_t *config_tree;
init_configuration(&config_tree);
read_config_options(config_tree, ent->d_name);
- read_host_config(config_tree, ent->d_name);
+ read_host_config(config_tree, ent->d_name
, true
);
if(!n) {
n = new_node();
if(!n) {
n = new_node();
@@
-583,7
+583,7
@@
bool setup_myself_reloadable(void) {
free(fmode);
}
free(fmode);
}
- choice =
true
;
+ choice =
!(myself->options & OPTION_TCPONLY)
;
get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice);
if(choice) {
get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice);
if(choice) {
@@
-637,7
+637,7
@@
bool setup_myself_reloadable(void) {
subnet_add(NULL, s);
}
subnet_add(NULL, s);
}
-#if !defined(IP
PROTO_IP) || !defined(IP
_TOS)
+#if !defined(IP_TOS)
if(priorityinheritance) {
logger(DEBUG_ALWAYS, LOG_WARNING, "%s not supported on this platform for IPv4 connections", "PriorityInheritance");
if(priorityinheritance) {
logger(DEBUG_ALWAYS, LOG_WARNING, "%s not supported on this platform for IPv4 connections", "PriorityInheritance");
@@
-645,7
+645,7
@@
bool setup_myself_reloadable(void) {
#endif
#endif
-#if !defined(IP
PROTO_IPV6) || !defined(IP
V6_TCLASS)
+#if !defined(IPV6_TCLASS)
if(priorityinheritance) {
logger(DEBUG_ALWAYS, LOG_WARNING, "%s not supported on this platform for IPv6 connections", "PriorityInheritance");
if(priorityinheritance) {
logger(DEBUG_ALWAYS, LOG_WARNING, "%s not supported on this platform for IPv6 connections", "PriorityInheritance");
@@
-843,7
+843,7
@@
static bool setup_myself(void) {
myself->connection = new_connection();
myself->name = name;
myself->connection->name = xstrdup(name);
myself->connection = new_connection();
myself->name = name;
myself->connection->name = xstrdup(name);
- read_host_config(config_tree, name);
+ read_host_config(config_tree, name
, true
);
if(!get_config_string(lookup_config(config_tree, "Port"), &myport)) {
myport = xstrdup("655");
if(!get_config_string(lookup_config(config_tree, "Port"), &myport)) {
myport = xstrdup("655");
@@
-902,6
+902,7
@@
static bool setup_myself(void) {
free(myport);
memcpy(&sa, ai->ai_addr, ai->ai_addrlen);
free(myport);
memcpy(&sa, ai->ai_addr, ai->ai_addrlen);
+ freeaddrinfo(ai);
sockaddr2str(&sa, NULL, &myport);
}
sockaddr2str(&sa, NULL, &myport);
}
@@
-948,6
+949,16
@@
static bool setup_myself(void) {
}
}
}
}
+ get_config_int(lookup_config(config_tree, "FWMark"), &fwmark);
+#ifndef SO_MARK
+
+ if(fwmark) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "FWMark not supported on this platform!");
+ return false;
+ }
+
+#endif
+
int replaywin_int;
if(get_config_int(lookup_config(config_tree, "ReplayWindow"), &replaywin_int)) {
int replaywin_int;
if(get_config_int(lookup_config(config_tree, "ReplayWindow"), &replaywin_int)) {