Guus Sliepen
099bc56f53
Apply patch from Max Rijevski fixing a memory leak when closing connections.
...
It also cleans up more when stopping tinc, helping tools like valgrind.
2008-12-23 23:14:37 +00:00
Guus Sliepen
046158a216
Use the crypto wrappers again instead of calling OpenSSL directly.
...
This theoretically allows other cryptographic libraries to be used,
and it improves the readability of the code.
2008-12-11 14:44:44 +00:00
Scott Lamb
6eaefb4dbc
Dump through control socket
...
Note this removes SIGUSR1, SIGUSR2, and the graph dumping config option.
It seems cleaner to do everything through the control socket.
2007-11-07 02:49:25 +00:00
Scott Lamb
40731d030f
Temporarily revert to old crypto code
...
(The new code is still segfaulting for me, and I'd like to proceed with other
work.)
This largely rolls back to the revision 1545 state of the existing code
(new crypto layer is still there with no callers), though I reintroduced
the segfault fix of revision 1562.
2007-11-07 02:47:05 +00:00
Guus Sliepen
1b8f891836
Finish crypto wrapping. Also provide wrappers for OpenSSL.
...
Disable libgcrypt by default. Since it doesn't support the OFB cipher mode,
we can't use it in a backwards compatible way.
2007-05-23 13:45:49 +00:00
Guus Sliepen
fbf305c09d
Use libevent for meta socket input/output buffering.
2007-05-19 22:23:02 +00:00
Guus Sliepen
fb0cfccf7d
Use splay trees instead of AVL trees.
2007-05-18 10:05:26 +00:00
Guus Sliepen
f02d3ed3e1
K&R style braces
2007-05-18 10:00:00 +00:00
Guus Sliepen
6ea1dfc995
Port fixes from release 1.0.8.
2007-05-17 19:15:48 +00:00
Guus Sliepen
480dd127c8
Make sure connection->name is never NULL.
2007-05-16 14:42:08 +00:00
Guus Sliepen
3730156165
Only free members of connection_t that have been allocated.
2007-03-12 17:55:43 +00:00
Scott Lamb
38c25d62c2
Convert to libevent.
...
This is a quick initial conversion that doesn't yet show much advantage:
- We roll our own timeouts.
- We roll our own signal handling.
- We build up the meta connection fd events on each loop rather than
on state changes.
2007-02-27 01:57:01 +00:00
Guus Sliepen
eb391c52ee
Do not break strict aliasing of status_t structs.
2006-08-08 13:21:08 +00:00
Guus Sliepen
de78d79db8
Update copyright notices, remove Ivo's email address.
2006-04-26 13:52:58 +00:00
Guus Sliepen
228e7a5c8f
Apply patch from Scott Lamb adding an output buffer for the TCP sockets.
...
This helps coalescing multiple send_meta() commands into one TCP packet.
Also limit the size of the output buffer before dropping PACKETs.
2006-01-19 17:13:18 +00:00
Guus Sliepen
df3220a154
Update copyright notices.
2005-05-04 18:09:30 +00:00
Guus Sliepen
56c36a14d8
Use the proper free function.
2004-12-03 13:27:33 +00:00
Guus Sliepen
18c617ecf2
Free memory used by connection_t after it is deleted from the connection tree.
2004-12-03 13:22:18 +00:00
Guus Sliepen
7926a156e5
Update copyrights, links, email addresses and let Subversion update $Id$ keywords.
2004-03-21 14:21:22 +00:00
Guus Sliepen
6c5f3d8b74
We don't have to tell GCC how to cast.
2003-08-28 21:05:11 +00:00
Guus Sliepen
714fb32d03
Fix compile errors and warnings.
2003-07-29 10:50:15 +00:00
Guus Sliepen
83263b7446
Sprinkle around a lot of const and some C99 initialisers.
2003-07-24 12:08:16 +00:00
Guus Sliepen
eefa28059a
Use bools and enums where appropriate.
2003-07-22 20:55:21 +00:00
Guus Sliepen
e449d94cae
Big header file cleanup: everything that has to do with standard system
...
libraries is moved to system.h.
2003-07-17 15:06:27 +00:00
Guus Sliepen
5db596c684
Simplify logging, update copyrights and some minor cleanups.
2003-07-12 17:41:48 +00:00
Guus Sliepen
1401faf608
Sprinkling the source with static and attributes.
2003-07-06 23:16:29 +00:00
Guus Sliepen
0b9175e998
Define logger(), cleans up source code and allows us to write log entries
...
to a separate file.
2003-07-06 22:11:37 +00:00
Guus Sliepen
6c7172d694
This subtle pointer arithmetic thingy is (I'm very sure of it) the cause
...
of the lingering connections problem. Hopefully it is fixed now...
2003-06-25 20:55:05 +00:00
Guus Sliepen
eaf1208e9d
Fix placement of #include "config.h"
2002-09-10 22:13:01 +00:00
Guus Sliepen
6f9f6779e6
Remove redundant spaces.
2002-09-09 22:33:31 +00:00
Guus Sliepen
f75dcef72a
Switch to K&R style indentation.
2002-09-09 21:25:28 +00:00
Guus Sliepen
5fc1ed17f4
Cleanups:
...
- Convert cp to cp(); so that automatic indenters work.
- Convert constructions like if(x == NULL) to if(!x).
- Move all assignments out of conditions.
2002-09-09 19:40:12 +00:00
Guus Sliepen
8b2b67e26c
Generalized request broadcasting/forwarding.
2002-09-04 16:26:45 +00:00
Guus Sliepen
627f7c22b4
s/sliepen.warande.net/sliepen.eu.org/g
...
s/itimmermans@bigfoot.com/ivo@o2w.nl/g
2002-06-21 10:11:37 +00:00
Guus Sliepen
3c5655f59e
Fix compiler warnings, strictly use long int and %lx for options.
2002-03-22 13:31:18 +00:00
Guus Sliepen
c2b9c06062
- Non-blocking connect()s.
...
- Socket handling revamped to use sockaddr_t.
- tinc can now tunnel over IPv6.
- Handle all addresses and subnets in network byte order.
Only convert them when they need to be printed.
- IPv6 subnets bigger than /128 now work.
- Use %s and strerror(errno) instead of %m.
2002-02-18 16:25:19 +00:00
Guus Sliepen
f0aa9641e8
Merging of the entire pre5 branch.
2002-02-10 21:57:54 +00:00
Ivo Timmermans
6cf744e4b2
Don't include netutl.h.
2001-11-16 12:22:02 +00:00
Ivo Timmermans
3ef15f2554
Changed lookup_connection to use struct addrinfo
2001-11-16 12:02:17 +00:00
Guus Sliepen
2165931c62
More updates to protocol handlers and reimplemented terminate_connection().
2001-10-30 16:34:32 +00:00
Guus Sliepen
b6298e2c08
- More changes needed for Kruskal's algorithm
...
- Implemented a breadth-first search algorithm as a cheap substitution for a
single-source shortest path algorithm.
2001-10-28 22:42:49 +00:00
Guus Sliepen
94497336ef
What was I thinking? s/vertex/edge/g.
2001-10-28 08:41:19 +00:00
Guus Sliepen
b98d9787fd
Various small fixes to make tinc runnable again.
2001-10-27 15:19:13 +00:00
Guus Sliepen
82e3837109
Big bad commit:
...
- Transition to new node/vertex/connection structures
- Use new configuration handling everywhere
- Linux tun/tap device handling cleanup
- Start of IPv6 support in route.c
It compiles, but it won't link.
2001-10-27 12:13:17 +00:00
Guus Sliepen
0bbace18e9
More updates to new node/vertex/connection combo.
2001-10-10 20:35:10 +00:00
Guus Sliepen
5904806dc8
Removed everything from connection.c that has already been moved to node.c and
...
vertex.c.
2001-10-10 09:42:29 +00:00
Guus Sliepen
21027b1d57
- Renamed lastbutonehop to prevhop.
...
- Added connection_t *via to connection_t, this keeps record of where
to send UDP packets to.
2001-10-08 11:47:55 +00:00
Guus Sliepen
4d3de3b6a9
Show next- and lastbutonehop when dumping connectionlist to syslog.
2001-09-24 14:16:29 +00:00
Guus Sliepen
acb853205d
Updated terminate_connection() so you can choose if DEL_HOSTs should be
...
sent or not.
2001-07-21 15:34:18 +00:00
Guus Sliepen
12f6b80429
Added purge_tree for connection_t's which are no longer in the connection,
...
active or id trees, but which may still be referenced. This tree is flushed
when it is safe, this replaces purge_connection_tree().
Also lots of bugfixes related to the new trees.
2001-07-20 20:25:10 +00:00
Guus Sliepen
319e0cb48e
Split connection list into two lists:
...
- one list to handle all incoming/outgoing TCP connections
- another list to handle all UDP connections
This will prevent race conditions.
2001-07-15 18:07:31 +00:00
Guus Sliepen
c9591bd1de
Fix gcc 3.0 warnings.
2001-06-29 13:09:55 +00:00
Guus Sliepen
4f9dad0972
- tinc can now act as a switch or a hub too (as opposed to a router only)
...
- cleaner initialisation of "UNKNOWN" and "MYSELF" names
2001-06-05 16:09:55 +00:00
Guus Sliepen
34f9e6cf2d
- route.c is now used to determine destination
...
- flags are removed, since they were not used at all. Use options instead.
- indirectdata works now, tcponly almost...
- made functions that don't return useful information void
2001-03-04 13:59:32 +00:00
Guus Sliepen
d3f889c807
- It's 2001, all copyright notices are updated.
2001-01-07 17:09:07 +00:00
Guus Sliepen
07a08f5539
- Reinstated a queue for outgoing packets.
2001-01-07 15:25:49 +00:00
Guus Sliepen
e924096f62
- Let user choose whether keys are in the config files or separate
...
- Use AVL trees instead of RBL trees
- Fixed a lot of annoying subtle bugs! Thanks to gdb...
2001-01-05 23:53:53 +00:00
Guus Sliepen
cf49b2c064
Another big & bad commit:
...
- Added some extra search functions to rbl routines
- Fix subnet_lookup()
- Reorder some syslog messages to make more sense
- daemon() is back
- Don't let scripts execute in parallel (gives race conditions, and
anyway something MIGHT just be configured which is necessary for further
execution of tinc itself)
- Accidently merged check_child() with execute_script().
- Small fixes
2000-11-24 23:13:07 +00:00
Guus Sliepen
dac256505e
- Fixed all (except 2) compiler warnings gcc -Wall gave.
2000-11-22 22:18:03 +00:00
Guus Sliepen
f8b4a000d0
- Cleaned up and checked for some more NULL pointers in rbl.c
...
- Two connection lists: one for incoming connections, sorted on ip/port,
one for connections whose identity we know, sorted on id ofcourse...
2000-11-22 18:54:08 +00:00
Guus Sliepen
3a6200c1e3
- Various small fixes.
2000-11-20 22:13:14 +00:00
Guus Sliepen
1857b3c97c
- Proper initialization of rbltree structures.
2000-11-20 19:41:13 +00:00
Guus Sliepen
408ca91766
- Integrate rbl trees into tinc.
2000-11-20 19:12:17 +00:00