thorkill
eda9f0ea8e
Set edge->reverse to NULL before we free it
2015-07-06 01:04:11 +02:00
thorkill
e51dd1b196
Changed the name of edge from node to oldnode
2015-07-06 00:42:59 +02:00
thorkill
7dc8c736bc
list_each shadowed node
...
move it into the loop
2015-07-05 22:32:32 +02:00
thorkill
841ca358e0
Forgot to set node->data
2015-07-05 21:58:27 +02:00
thorkill
25ad32d206
Use usage of splay_node_t
2015-07-05 21:41:49 +02:00
thorkill
bebe8e6808
Fixed edge->reverse corruption resulting in a segfault in graph()
...
Thanks to Guus for helping us with this one.
2015-07-05 20:54:32 +02:00
thorkill
82706970cf
Removed unused declaration in bind_to_intercface()
2015-07-05 00:32:11 +02:00
thorkill
614a03c886
Do not try to zero memory on unitialized hash
2015-07-05 00:31:39 +02:00
thorkill
aea7938f19
Added sanity check in test in sssp_bfs()
2015-07-05 00:31:01 +02:00
thorkill
837469c747
Add small jitter to keyexpire_handle and edgeupdate_handler
2015-07-05 00:16:02 +02:00
thorkill
d172f2db29
Merge with guus patch for exit_edges()
2015-07-05 00:15:04 +02:00
thorkill
aa9994e49e
Cleanup after merge
2015-07-04 18:52:16 +02:00
thorkill
dc5491a59e
Merge branch '1.1' of github.com:gsliepen/tinc into thkr-1.1-ponyhof
2015-07-04 18:45:43 +02:00
Guus Sliepen
de7d9ee437
Call sockaddrfree(&e->local_address) in free_edge() instead of exit_edges().
...
The proper place to clean up resources of objects is in their
destructor. This makes sure proper cleanup when edge_del() is called as
well. At exit, free_edge() is called on all edges by free_edge_tree(),
which is called by exit_nodes().
2015-07-04 17:53:11 +02:00
Guus Sliepen
36cec9af88
Coalesce two if statements that check for the same thing.
2015-07-04 17:51:05 +02:00
Jo-Philipp Wich
14ccf50954
fix musl compatibility
...
Let configure include sys/if_tun.h when testing for netinet/if_ether.h
to detect the Kernel/libc header conflict on musl.
After this patch, configure will correctly detect netinet/if_ether.h as
unusable and the subsequent compilation will not attempt to use it.
Conflicts:
src/have.h
2015-07-04 17:34:37 +02:00
Guus Sliepen
37588b8d5c
Don't #include OpenSSL headers when compiling without OpenSSL.
2015-07-04 17:34:31 +02:00
thorkill
abb24e9d71
Cleanup local_address in protocol_edge.c
...
In line 131 local_address has been defined,
but the memory was never freed on return.
2015-07-04 03:24:13 +02:00
thorkill
92df36a610
Cleanup edges stored in edge_weight_tree on exit
...
protocol_edge.c: 131 defines local_address using str2sockaddr
str2sockaddr() allocates memory which has to be freed on exit.
2015-07-04 03:24:05 +02:00
thorkill
1140ca6d30
Fixed 2 leaks in setup_myself()
2015-07-04 03:23:58 +02:00
thorkill
e3ae318059
Cleanup local_address in protocol_edge.c
...
In line 131 local_address has been defined,
but the memory was never freed on return.
2015-07-04 03:21:01 +02:00
thorkill
d08c7cf4cf
Cleanup edges stored in edge_weight_tree on exit
...
protocol_edge.c: 131 defines local_address using str2sockaddr
str2sockaddr() allocates memory which has to be freed on exit.
2015-07-04 02:39:12 +02:00
thorkill
6efd3ff302
Fixed 2 leaks in setup_myself()
2015-07-04 00:29:36 +02:00
thorkill
94703cdfa9
getopt.c fixes for unitialized parameters on FreeBSD
2015-07-02 21:48:15 +02:00
thorkill
ad58c0f65d
Revert "Marked missing parameters in getopt.c on FreeBSD"
...
This reverts commit 5bba2cc066
.
2015-07-02 21:45:43 +02:00
thorkill
5bba2cc066
Marked missing parameters in getopt.c on FreeBSD
2015-07-02 21:42:44 +02:00
thorkill
3f4855587c
Marked unused parameter in net_socket.c
...
Found by clang on FreeBSD
2015-07-02 21:39:07 +02:00
thorkill
d2e038ab24
Makred unused parameter in net_packet.c
...
Found by clang -Wunused-parameter on FreeBSD
2015-07-02 21:37:33 +02:00
Florian Klink
0267aef826
setup_outgoing_connection: log to LOG_DEBUG on if no known address
...
With AutoConnect = yes, tinc tries to establish connections to known hosts.
However, you could have set no Address for this host, which is perfectly fine
(as long as there is at least one bootstrap node with an address or a local
discovered node already part of the network)
So log this to LOG_DEBUG
2015-07-02 21:22:53 +02:00
Florian Klink
91355b9ac5
(read|append)_config_file: log open errors as LOG_DEBUG
...
In a "decentrally managed vpn" it is very likely that host config
files for some reachable nodes do not exist. Currently, tinc
fills the logs with "Cannot open config file" messages.
This commit changes the log level to LOG_DEBUG so
syslog doesn't get filled by default.
2015-07-02 21:22:47 +02:00
thorkill
743671278f
Attempt to track an segfault in mst_kruskal()
...
(gdb) bt
#0 mst_kruskal () at graph.c:107
#1 graph () at graph.c:302
#2 0x00007ffff7b509fe in del_edge_h (c=<optimized out>, request=<optimized out>) at protocol_edge.c:292
#3 0x00007ffff7b4de2e in receive_request (c=0x5555557e3ef0, request=0x555555800e13 "13 3fc17404 node1 node2") at protocol.c:136
#4 0x00007ffff7b43513 in receive_meta (c=0x5555557e3ef0) at meta.c:290
#5 0x00007ffff7b442d9 in handle_meta_connection_data (c=0x5555557e3ef0) at net.c:291
#6 0x00007ffff7b41391 in event_loop () at event.c:287
#7 0x00007ffff7b449b2 in main_loop () at net.c:469
#8 0x0000555555556716 in main (argc=<optimized out>, argv=<optimized out>) at tincd.c:480
2015-07-02 20:38:02 +02:00
thorkill
f1a9a40c90
Marked all unsued parameters found by -Werror=unused-parameter with UNUSED()
2015-07-02 18:37:08 +02:00
thorkill
1391b2d7dc
Added -Werror=unused-parameter
...
In system.h UNUSED() macro has been defined which can be used to mark unsed parameters.
2015-07-02 18:35:57 +02:00
thorkill
50da19addf
Removed unused variables.
...
Found using clang -Wunused-variable
2015-07-02 18:03:03 +02:00
thorkill
656af8fa07
Remove conflicting function definitions
...
- send_request
- send_meta
2015-07-02 17:51:46 +02:00
thorkill
9b3ff33dba
Added missing function prototypes
...
Found by clang -Wmissing-prototypes
2015-07-02 17:43:51 +02:00
thorkill
78397eda9b
Added extra check for edge->from and edge->to in edge_add
...
edge_add() and edge_del() assume, that from and to are always set.
This was triggered while working on cmocka test.
2015-07-02 00:02:05 +02:00
thorkill
536256b2da
Added support for cmocka *alloc
2015-07-01 19:04:22 +02:00
thorkill
dca3558d05
Leave a notice in the log when aborting
2015-07-01 19:01:42 +02:00
thorkill
24cea32efb
Fix memory leak in splay_delete_tree
...
Use splay_delete_node to properly decrease counters and release memory.
2015-07-01 16:57:05 +02:00
thorkill
faef01317b
Do not free splay_tree when tree->count != 0
2015-07-01 16:56:07 +02:00
thorkill
278cd4d856
Added missing libchacha_poly1305 while linking sptps_* tools
...
- should work on gentoo and Arch Linux - AUR
2015-07-01 13:54:57 +02:00
thorkill
905572863c
Added support for darwin
...
Darwin does not have -lrt
2015-07-01 11:18:29 +02:00
thorkill
fbb62fa80e
Make proper checks in configure
...
now compiles with gcc 5.1.0
2015-06-30 23:20:31 +02:00
thorkill
c3f8a93d52
Define variables in getopt.h
2015-06-30 22:50:29 +02:00
thorkill
82300c623d
Make sptps_speed and sptps_test compile
...
TODO: tests do not work
2015-06-30 22:49:11 +02:00
thorkill
4bfa726f8b
Cleanup src/Makefile.am
...
Make it compile on FreeBSD
2015-06-30 22:48:15 +02:00
thorkill
f8154e3012
Initialize values in tincctl.c
2015-06-30 19:51:19 +02:00
thorkill
6a6113b366
Initialize variables in info.c
2015-06-30 19:48:49 +02:00
thorkill
84d34f4f35
Initialize variables in invitation.c
2015-06-30 19:46:14 +02:00
thorkill
8fb52e05f3
Define g_argv as static
2015-06-30 19:44:35 +02:00
thorkill
de9f04c30e
Initialize variables in linux/device.c
2015-06-30 19:42:37 +02:00
thorkill
fb2942a249
Initialize result
2015-06-30 19:40:33 +02:00
thorkill
7a61acabea
Added hash_t definitions
2015-06-30 19:39:11 +02:00
thorkill
9e0c77e21f
Initialize variables in splay_tree.c - splay_top_down()
2015-06-30 19:35:13 +02:00
thorkill
044fc684d0
Initialize variables in route.c
2015-06-30 19:33:22 +02:00
thorkill
6b3b90a7b1
Initialize variables in protocol_subnet.c
2015-06-30 19:29:44 +02:00
thorkill
932dc76f43
Initialize variables in protocol_edge.c
2015-06-30 19:28:11 +02:00
thorkill
fb1a8fd631
Initialize variables in protocol.c
2015-06-30 19:26:42 +02:00
thorkill
0bd116195a
Initialize variables in node.c
2015-06-30 19:24:27 +02:00
thorkill
d803ac93dc
Initialize variables in netutl.c
2015-06-30 19:23:15 +02:00
thorkill
e2245da720
Initialize addrinfo hint
2015-06-30 19:20:57 +02:00
thorkill
94b9723917
Initialize sock
2015-06-30 19:19:30 +02:00
thorkill
c17cb1a0f2
Proper initialization of subnet
2015-06-30 19:15:43 +02:00
thorkill
7ed725888b
Do not exit on unused-parameters
2015-06-30 19:15:22 +02:00
thorkill
78be3b19de
Fixed signal_t initialization
2015-06-30 19:14:54 +02:00
thorkill
8f5a59a027
Included missing names.h
2015-06-30 19:11:45 +02:00
thorkill
3dc9542ec2
Disable -fno-strict-overflow and enable some -Werror=
2015-06-30 19:06:17 +02:00
thorkill
daf99058e3
Moved few config parameters to make lib usage possible.
2015-06-30 18:43:37 +02:00
thorkill
6633bf52e3
First working version
2015-06-30 18:36:57 +02:00
thorkill
6d9853618a
Working on libs
2015-06-30 18:36:46 +02:00
thorkill
6b62992c25
Revert "Silence most noisy sources of memory leakage."
...
This reverts commit 408fb3b011
.
2015-06-30 18:10:38 +02:00
thorkill
c53a9719d5
Revert "s_errno was nerver used"
...
This reverts commit 157ee90568
.
2015-06-30 18:10:23 +02:00
thorkill
d661be413f
Revert "Proper variable initialization"
...
This reverts commit bf91a8a340
.
2015-06-30 18:10:20 +02:00
thorkill
54b8bc6e86
Revert "Type mismatch and debug_t is always >= 0"
...
This reverts commit 62dc7b6fe5
.
2015-06-30 18:10:18 +02:00
thorkill
8a39621c64
Revert "make usage of function parameters"
...
This reverts commit 8108b0d5eb
.
2015-06-30 18:10:16 +02:00
thorkill
f5f35bd148
Revert "initialize variables used in conditional jumps"
...
This reverts commit f89b38947a
.
2015-06-30 18:10:10 +02:00
thorkill
104017df7a
Revert "Added UNUSED macro to silnce unused-parameter warnings"
...
This reverts commit 8d4b974dda
.
2015-06-30 18:10:07 +02:00
thorkill
c68aa9d5cc
Revert "explicit middle parameter definition"
...
This reverts commit 0ef605d864
.
2015-06-30 18:10:05 +02:00
thorkill
ce7b019067
Revert "Added type casting from debug_t to int"
...
This reverts commit 3bfb343b85
.
2015-06-30 18:10:02 +02:00
thorkill
d7c623b8c7
Revert "Changed int size into size_t"
...
This reverts commit f755d57f4e
.
2015-06-30 18:10:00 +02:00
thorkill
5dac5eb451
Revert "Marked unused parameters"
...
This reverts commit 3a61d104d4
.
2015-06-30 18:09:50 +02:00
thorkill
3eb3cc7898
Revert "Type casting fixes"
...
This reverts commit dbfc168fa4
.
2015-06-30 18:09:17 +02:00
thorkill
01098e2078
Revert "Fixing implicit conversion changes to signedness"
...
This reverts commit 7099a4437e
.
2015-06-30 18:09:11 +02:00
thorkill
4f82a6359f
Revert "Proper struct initialization"
...
This reverts commit bc8dbfc9fd
.
2015-06-30 18:09:07 +02:00
thorkill
84ede57e52
Revert "fixed initialization of pollfd"
...
This reverts commit 319e0ac8ce
.
2015-06-30 18:09:02 +02:00
thorkill
fe99eb02df
Revert "Still hunting down uninitialized variables"
...
This reverts commit 46b9578cad
.
2015-06-30 18:08:31 +02:00
thorkill
46b9578cad
Still hunting down uninitialized variables
2015-06-30 02:04:16 +02:00
thorkill
319e0ac8ce
fixed initialization of pollfd
2015-06-29 23:40:33 +02:00
thorkill
bc8dbfc9fd
Proper struct initialization
...
Detected by clang -Wmissing-field-initializers
2015-06-29 23:32:34 +02:00
thorkill
7099a4437e
Fixing implicit conversion changes to signedness
...
- format string
- function parameters
- logging
2015-06-29 23:32:26 +02:00
thorkill
dbfc168fa4
Type casting fixes
2015-06-29 16:19:23 +02:00
thorkill
3a61d104d4
Marked unused parameters
2015-06-29 16:19:19 +02:00
thorkill
f755d57f4e
Changed int size into size_t
2015-06-29 16:19:15 +02:00
thorkill
3bfb343b85
Added type casting from debug_t to int
2015-06-29 16:19:11 +02:00
thorkill
0ef605d864
explicit middle parameter definition
...
error: use of GNU ?: conditional expression extension, omitting middle operand [-Werror,-Wgnu-conditional-omitted-operand]
2015-06-29 16:19:03 +02:00
thorkill
8d4b974dda
Added UNUSED macro to silnce unused-parameter warnings
2015-06-29 16:18:52 +02:00
thorkill
f89b38947a
initialize variables used in conditional jumps
...
Errors detected by clang -Wconditional-uninitialized.
2015-06-29 16:18:39 +02:00
thorkill
8108b0d5eb
make usage of function parameters
2015-06-29 16:18:30 +02:00
thorkill
62dc7b6fe5
Type mismatch and debug_t is always >= 0
...
- Proper function definitions
2015-06-29 16:18:20 +02:00