projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the StrictSubnets option.
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
cad84cc
..
cb606ca
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-339,7
+339,9
@@
bool setup_myself(void) {
if(myself->options & OPTION_TCPONLY)
myself->options |= OPTION_INDIRECT;
if(myself->options & OPTION_TCPONLY)
myself->options |= OPTION_INDIRECT;
+ get_config_bool(lookup_config(config_tree, "StrictSubnets"), &strictsubnets);
get_config_bool(lookup_config(config_tree, "TunnelServer"), &tunnelserver);
get_config_bool(lookup_config(config_tree, "TunnelServer"), &tunnelserver);
+ strictsubnets |= tunnelserver;
if(get_config_string(lookup_config(config_tree, "Mode"), &mode)) {
if(!strcasecmp(mode, "router"))
if(get_config_string(lookup_config(config_tree, "Mode"), &mode)) {
if(!strcasecmp(mode, "router"))
@@
-485,7
+487,7
@@
bool setup_myself(void) {
graph();
graph();
- if(
tunnelserver
)
+ if(
strictsubnets
)
load_all_subnets();
/* Open device */
load_all_subnets();
/* Open device */