tinc
17 years agoOnly check for libgcrypt if --with-gcrypt is used.
Guus Sliepen [Tue, 4 Sep 2007 14:57:37 +0000 (14:57 +0000)]
Only check for libgcrypt if --with-gcrypt is used.

17 years agoconst correctness
Scott Lamb [Fri, 20 Jul 2007 20:10:46 +0000 (20:10 +0000)]
const correctness

cipher_encrypt and cipher_decrypt should take "const void *" data

17 years agoUpdated svn:ignores list for new symlinked sources and tincctl.
Scott Lamb [Wed, 18 Jul 2007 16:44:05 +0000 (16:44 +0000)]
Updated svn:ignores list for new symlinked sources and tincctl.

17 years agoRefresh po/POTFILES.in.
Scott Lamb [Wed, 18 Jul 2007 16:40:41 +0000 (16:40 +0000)]
Refresh po/POTFILES.in.

In particular, remove lib/pidfile.c which was causing failures. Also sort
for diffability with "find . -type f -name '*.c' | cut -c3- | sort" output.

17 years agoRevert to only requiring autoconf 2.59.
Scott Lamb [Wed, 18 Jul 2007 16:40:29 +0000 (16:40 +0000)]
Revert to only requiring autoconf 2.59.

The new autoconf macros introduced at the same time (AC_GNU_SOURCE,
AC_FUNC_MALLOC, AC_FUNC_REALLOC) exist in the autoconf 2.59 documentation,
and autoconf 2.59 appears to still work. This is more convenient, as RHEL 5
ships with autoconf 2.59.

17 years agoFinish crypto wrapping. Also provide wrappers for OpenSSL.
Guus Sliepen [Wed, 23 May 2007 13:45:49 +0000 (13:45 +0000)]
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.

17 years agoSome more crypto wrapper functions are needed.
Guus Sliepen [Tue, 22 May 2007 23:41:22 +0000 (23:41 +0000)]
Some more crypto wrapper functions are needed.

17 years agoMake sure the crypto wrapper functions can actually be compiled.
Guus Sliepen [Tue, 22 May 2007 21:44:17 +0000 (21:44 +0000)]
Make sure the crypto wrapper functions can actually be compiled.

17 years agoCreate wrappers for the cryptographic operations used in tinc.
Guus Sliepen [Tue, 22 May 2007 21:32:48 +0000 (21:32 +0000)]
Create wrappers for the cryptographic operations used in tinc.
Implement them using libgcrypt.

17 years agoParse PEM RSA keys ourself, and use libgcrypt to do RSA encryption and decryption.
Guus Sliepen [Sun, 20 May 2007 22:28:49 +0000 (22:28 +0000)]
Parse PEM RSA keys ourself, and use libgcrypt to do RSA encryption and decryption.

17 years agoUse libevent for meta socket input/output buffering.
Guus Sliepen [Sat, 19 May 2007 22:23:02 +0000 (22:23 +0000)]
Use libevent for meta socket input/output buffering.

17 years agoUse bufferevents to handle control socket buffering.
Guus Sliepen [Sat, 19 May 2007 16:21:52 +0000 (16:21 +0000)]
Use bufferevents to handle control socket buffering.

17 years agoImplement "stop" command, and allow tincctl to retrieve a running tincd's PID.
Guus Sliepen [Sat, 19 May 2007 15:21:26 +0000 (15:21 +0000)]
Implement "stop" command, and allow tincctl to retrieve a running tincd's PID.

17 years agoMove key generation to tincctl.
Guus Sliepen [Sat, 19 May 2007 14:55:35 +0000 (14:55 +0000)]
Move key generation to tincctl.

17 years agoRemove pidfile in favour of control socket.
Guus Sliepen [Sat, 19 May 2007 14:13:21 +0000 (14:13 +0000)]
Remove pidfile in favour of control socket.

17 years agoFix retrying outgoing connections.
Guus Sliepen [Sat, 19 May 2007 13:34:32 +0000 (13:34 +0000)]
Fix retrying outgoing connections.

17 years agoWe can safely delete a connection_t in terminate_connection() now.
Guus Sliepen [Sat, 19 May 2007 12:07:30 +0000 (12:07 +0000)]
We can safely delete a connection_t in terminate_connection() now.

17 years agoStart of control socket implementation.
Guus Sliepen [Fri, 18 May 2007 16:52:34 +0000 (16:52 +0000)]
Start of control socket implementation.

17 years agoUpdate documentation.
Guus Sliepen [Fri, 18 May 2007 11:54:16 +0000 (11:54 +0000)]
Update documentation.

17 years agoShow branch version number.
Guus Sliepen [Fri, 18 May 2007 11:35:21 +0000 (11:35 +0000)]
Show branch version number.

17 years agoMore consistent variable naming.
Guus Sliepen [Fri, 18 May 2007 11:19:31 +0000 (11:19 +0000)]
More consistent variable naming.

17 years agoDetect duplicate outgoing connections.
Guus Sliepen [Fri, 18 May 2007 10:29:10 +0000 (10:29 +0000)]
Detect duplicate outgoing connections.

17 years agoUse splay trees instead of AVL trees.
Guus Sliepen [Fri, 18 May 2007 10:05:26 +0000 (10:05 +0000)]
Use splay trees instead of AVL trees.

17 years agoK&R style braces
Guus Sliepen [Fri, 18 May 2007 10:00:00 +0000 (10:00 +0000)]
K&R style braces

17 years agoRemove last references to the global variable "running".
Guus Sliepen [Fri, 18 May 2007 09:51:54 +0000 (09:51 +0000)]
Remove last references to the global variable "running".

17 years agoRemove the last bits of the legacy main_loop().
Guus Sliepen [Fri, 18 May 2007 09:43:52 +0000 (09:43 +0000)]
Remove the last bits of the legacy main_loop().

17 years agoRemove global variable "now".
Guus Sliepen [Fri, 18 May 2007 09:34:06 +0000 (09:34 +0000)]
Remove global variable "now".

17 years agoMove key regeneration handling to net_setup.c.
Guus Sliepen [Thu, 17 May 2007 23:57:48 +0000 (23:57 +0000)]
Move key regeneration handling to net_setup.c.

17 years agoUse libevent to handle key expiration.
Guus Sliepen [Thu, 17 May 2007 23:33:07 +0000 (23:33 +0000)]
Use libevent to handle key expiration.

17 years agoUse libevent to age learned MAC addresses.
Guus Sliepen [Thu, 17 May 2007 23:24:40 +0000 (23:24 +0000)]
Use libevent to age learned MAC addresses.

17 years agoUse libevent to age past requests.
Guus Sliepen [Thu, 17 May 2007 23:14:42 +0000 (23:14 +0000)]
Use libevent to age past requests.

17 years agoRedo SIGALRM handling.
Guus Sliepen [Thu, 17 May 2007 23:04:02 +0000 (23:04 +0000)]
Redo SIGALRM handling.

17 years agoUse libevent to handle all non-fatal signals.
Guus Sliepen [Thu, 17 May 2007 22:41:34 +0000 (22:41 +0000)]
Use libevent to handle all non-fatal signals.

17 years agoProperly use the timeout_initialized() macro.
Guus Sliepen [Thu, 17 May 2007 22:17:24 +0000 (22:17 +0000)]
Properly use the timeout_initialized() macro.

17 years agoRemove legacy event system.
Guus Sliepen [Thu, 17 May 2007 22:13:12 +0000 (22:13 +0000)]
Remove legacy event system.

17 years agoUse libevent for retrying outgoing connections.
Guus Sliepen [Thu, 17 May 2007 22:09:55 +0000 (22:09 +0000)]
Use libevent for retrying outgoing connections.

17 years agoUse libevent to send MTU probes.
Guus Sliepen [Thu, 17 May 2007 22:01:07 +0000 (22:01 +0000)]
Use libevent to send MTU probes.

17 years agoConfigure events after obtaining a socket.
Guus Sliepen [Thu, 17 May 2007 21:47:27 +0000 (21:47 +0000)]
Configure events after obtaining a socket.

17 years agoUse libevent to handle HUP signal.
Guus Sliepen [Thu, 17 May 2007 21:34:58 +0000 (21:34 +0000)]
Use libevent to handle HUP signal.

17 years agoUse libevent to dump graphs when necessary.
Guus Sliepen [Thu, 17 May 2007 21:14:30 +0000 (21:14 +0000)]
Use libevent to dump graphs when necessary.
event_add() can be called repeatedly, the second and later calls are ignored if
the event hasn't been removed yet.

17 years agoUse a separate event structure to handle meta data writes.
Guus Sliepen [Thu, 17 May 2007 20:20:10 +0000 (20:20 +0000)]
Use a separate event structure to handle meta data writes.
Make meta socket events persistent.

17 years ago128 listener sockets is way too much.
Guus Sliepen [Thu, 17 May 2007 19:52:12 +0000 (19:52 +0000)]
128 listener sockets is way too much.

17 years agoProperly delete listener socket events on shutdown.
Guus Sliepen [Thu, 17 May 2007 19:51:26 +0000 (19:51 +0000)]
Properly delete listener socket events on shutdown.

17 years agoPort fixes from release 1.0.8.
Guus Sliepen [Thu, 17 May 2007 19:15:48 +0000 (19:15 +0000)]
Port fixes from release 1.0.8.

17 years agoOnly free members of connection_t that have been allocated.
Guus Sliepen [Mon, 12 Mar 2007 17:55:43 +0000 (17:55 +0000)]
Only free members of connection_t that have been allocated.

17 years agoLots of svn:ignore entries
Scott Lamb [Tue, 27 Feb 2007 08:13:41 +0000 (08:13 +0000)]
Lots of svn:ignore entries

17 years agoConvert to libevent.
Scott Lamb [Tue, 27 Feb 2007 01:57:01 +0000 (01:57 +0000)]
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.

17 years agoA couple missed tevent things.
Scott Lamb [Tue, 27 Feb 2007 01:30:57 +0000 (01:30 +0000)]
A couple missed tevent things.
(Sorry; had a couple changes queued.)

17 years agoRename "event_t" to "tevent_t", along with associated functions.
Scott Lamb [Tue, 27 Feb 2007 01:26:11 +0000 (01:26 +0000)]
Rename "event_t" to "tevent_t", along with associated functions.
This relieves some confusion and problems during the libevent transition.
In particular, "event_add" was defined by both.
(The 't' stands for 'timeout', 'tinc', 'temporary', or some such.)

17 years agoCreated the 1.1 branch where large code changes can take place,
Guus Sliepen [Sat, 24 Feb 2007 22:50:42 +0000 (22:50 +0000)]
Created the 1.1 branch where large code changes can take place,
at the same time keeping compatibility with 1.0.

17 years agoClose the proper filedescriptor (if it exists).
Guus Sliepen [Wed, 14 Feb 2007 09:32:16 +0000 (09:32 +0000)]
Close the proper filedescriptor (if it exists).

17 years agoApply patch from Scott Lamb fixing some memory and resource leaks.
Guus Sliepen [Wed, 14 Feb 2007 09:21:34 +0000 (09:21 +0000)]
Apply patch from Scott Lamb fixing some memory and resource leaks.

17 years agoApply patch from Scott Lamb preventing an infinite loop when sending SIGALRM.
Guus Sliepen [Wed, 14 Feb 2007 09:20:20 +0000 (09:20 +0000)]
Apply patch from Scott Lamb preventing an infinite loop when sending SIGALRM.

17 years agoReleasing 1.0.7. release-1.0.7
Guus Sliepen [Fri, 5 Jan 2007 15:03:07 +0000 (15:03 +0000)]
Releasing 1.0.7.

17 years agoUpdate copyright notices.
Guus Sliepen [Fri, 5 Jan 2007 13:18:36 +0000 (13:18 +0000)]
Update copyright notices.

17 years agoNo things to do for the 1.0 branch except bugfixing.
Guus Sliepen [Fri, 5 Jan 2007 13:17:33 +0000 (13:17 +0000)]
No things to do for the 1.0 branch except bugfixing.

17 years agorename() cannot replace existing files on Windows.
Guus Sliepen [Fri, 5 Jan 2007 05:44:01 +0000 (05:44 +0000)]
rename() cannot replace existing files on Windows.

17 years agoFix generic BSD tun device to write only the actual packet length.
Guus Sliepen [Fri, 5 Jan 2007 04:49:02 +0000 (04:49 +0000)]
Fix generic BSD tun device to write only the actual packet length.
Due to a copy&paste bug, it tried to write a packet with the maximum size.
This was not a problem until the maximum size was increased to support VLANs.

17 years agoTapreader socket should be bound to localhost only.
Guus Sliepen [Thu, 4 Jan 2007 15:28:36 +0000 (15:28 +0000)]
Tapreader socket should be bound to localhost only.

17 years agoUse a ringbuffer in shared memory to transfer packets from the tapreader thread to...
Guus Sliepen [Wed, 3 Jan 2007 18:18:54 +0000 (18:18 +0000)]
Use a ringbuffer in shared memory to transfer packets from the tapreader thread to the main thread.
It's a wonder it ever worked before. The socket that is created is not of a
datagram type, therefore packet boundaries were not preserved, which becomes
a problem as soon as the TAP-Win32 device receives packets in fast succession.

17 years agoReleasing 1.0.6. release-1.0.6
Guus Sliepen [Mon, 18 Dec 2006 17:38:05 +0000 (17:38 +0000)]
Releasing 1.0.6.

17 years agoPrevent compiler warnings about redefinition of EAI_FAMILY on FreeBSD 6.1.
Guus Sliepen [Mon, 18 Dec 2006 11:41:53 +0000 (11:41 +0000)]
Prevent compiler warnings about redefinition of EAI_FAMILY on FreeBSD 6.1.

17 years agoDo a simple test for linux/if_tun.h instead of no test at all.
Guus Sliepen [Sat, 16 Dec 2006 16:53:58 +0000 (16:53 +0000)]
Do a simple test for linux/if_tun.h instead of no test at all.

17 years agoRemove the test for linux/if_tun.h.
Guus Sliepen [Sat, 16 Dec 2006 16:40:09 +0000 (16:40 +0000)]
Remove the test for linux/if_tun.h.
It has been available for years on any decent Linux distribution.
Although linux/if_tun.h is now required to compile tinc,
you can still run it on systems which only support Ethertap.

17 years agoWe do properly check for malloc and realloc.
Guus Sliepen [Sat, 16 Dec 2006 16:34:04 +0000 (16:34 +0000)]
We do properly check for malloc and realloc.

17 years agoUse standard autoconf macros instead of our own.
Guus Sliepen [Sat, 16 Dec 2006 16:26:57 +0000 (16:26 +0000)]
Use standard autoconf macros instead of our own.

17 years agoFix rule that creates html version of manpages.
Guus Sliepen [Sat, 16 Dec 2006 16:26:08 +0000 (16:26 +0000)]
Fix rule that creates html version of manpages.

17 years agoRemove old Spanish translation.
Guus Sliepen [Fri, 15 Dec 2006 20:44:33 +0000 (20:44 +0000)]
Remove old Spanish translation.

17 years agoRemove unnecessary stuff from configure.in.
Guus Sliepen [Fri, 15 Dec 2006 20:43:39 +0000 (20:43 +0000)]
Remove unnecessary stuff from configure.in.

17 years agoUse the correct next pointer.
Guus Sliepen [Tue, 12 Dec 2006 14:54:39 +0000 (14:54 +0000)]
Use the correct next pointer.

17 years agoWhen building the minimum spanning tree, make sure we start from a reachable node.
Guus Sliepen [Tue, 12 Dec 2006 14:49:09 +0000 (14:49 +0000)]
When building the minimum spanning tree, make sure we start from a reachable node.

17 years agoSearch for lzo/lzo1x.h, lzo2/lzo1x.h and lzo1x.h.
Guus Sliepen [Wed, 29 Nov 2006 17:18:39 +0000 (17:18 +0000)]
Search for lzo/lzo1x.h, lzo2/lzo1x.h and lzo1x.h.

17 years agoMake sure resolved addressed for outgoing connections are freed, if there are any.
Guus Sliepen [Wed, 29 Nov 2006 16:57:46 +0000 (16:57 +0000)]
Make sure resolved addressed for outgoing connections are freed, if there are any.

18 years agoReleasing 1.0.5. release-1.0.5
Guus Sliepen [Tue, 14 Nov 2006 15:43:28 +0000 (15:43 +0000)]
Releasing 1.0.5.

18 years agoEWOULDBLOCK does not exist on platforms without O_NONBLOCK
Guus Sliepen [Tue, 14 Nov 2006 12:28:04 +0000 (12:28 +0000)]
EWOULDBLOCK does not exist on platforms without O_NONBLOCK

18 years agoWhen deleting an entire tree, start at head, not at root.
Guus Sliepen [Sat, 11 Nov 2006 22:45:45 +0000 (22:45 +0000)]
When deleting an entire tree, start at head, not at root.

18 years agoNodes use events, so event system should be initialised first and destroyed last.
Guus Sliepen [Sat, 11 Nov 2006 22:44:15 +0000 (22:44 +0000)]
Nodes use events, so event system should be initialised first and destroyed last.

18 years agoUpdate Dutch translation.
Guus Sliepen [Sat, 11 Nov 2006 21:37:22 +0000 (21:37 +0000)]
Update Dutch translation.

18 years agoDocument GraphDumpFile option.
Guus Sliepen [Sat, 11 Nov 2006 20:37:58 +0000 (20:37 +0000)]
Document GraphDumpFile option.

18 years agoSupport and autodetect LZO version 2.0 and later.
Guus Sliepen [Sat, 11 Nov 2006 20:10:46 +0000 (20:10 +0000)]
Support and autodetect LZO version 2.0 and later.

18 years agoSupport and autodetect LZO version 2.0 and later.
Guus Sliepen [Sat, 11 Nov 2006 20:06:14 +0000 (20:06 +0000)]
Support and autodetect LZO version 2.0 and later.

18 years agopopen() requires pclose().
Guus Sliepen [Sat, 11 Nov 2006 14:37:03 +0000 (14:37 +0000)]
popen() requires pclose().

18 years agoAdded graph dumping ability based on Markus Goetz's patch.
Guus Sliepen [Sat, 11 Nov 2006 14:11:16 +0000 (14:11 +0000)]
Added graph dumping ability based on Markus Goetz's patch.

18 years agoThe "active" bit in node.status is not used.
Guus Sliepen [Sat, 11 Nov 2006 13:43:00 +0000 (13:43 +0000)]
The "active" bit in node.status is not used.

18 years agomemcpy() addresses from packet headers before calling the lookup functions.
Guus Sliepen [Wed, 9 Aug 2006 22:31:10 +0000 (22:31 +0000)]
memcpy() addresses from packet headers before calling the lookup functions.
This probably fixes a problem on the ARM architecture that causes tinc to fail to lookup IPv4 addresses.

18 years agoRemove unused variable.
Guus Sliepen [Tue, 8 Aug 2006 13:50:58 +0000 (13:50 +0000)]
Remove unused variable.

18 years agoRemove unused parameter from maskcmp().
Guus Sliepen [Tue, 8 Aug 2006 13:44:37 +0000 (13:44 +0000)]
Remove unused parameter from maskcmp().

18 years agoRemove unused variables.
Guus Sliepen [Tue, 8 Aug 2006 13:44:19 +0000 (13:44 +0000)]
Remove unused variables.

18 years agoFix format string warnings.
Guus Sliepen [Tue, 8 Aug 2006 13:29:17 +0000 (13:29 +0000)]
Fix format string warnings.

18 years agoDo not break strict aliasing of status_t structs.
Guus Sliepen [Tue, 8 Aug 2006 13:21:08 +0000 (13:21 +0000)]
Do not break strict aliasing of status_t structs.

18 years agoAdd generic host-up and host-down scripts.
Guus Sliepen [Mon, 12 Jun 2006 21:45:39 +0000 (21:45 +0000)]
Add generic host-up and host-down scripts.
Thanks to Menno Smits for a patch.

18 years agoUse memcpy() to copy sockaddrs returned by getaddrinfo().
Guus Sliepen [Sun, 11 Jun 2006 18:53:27 +0000 (18:53 +0000)]
Use memcpy() to copy sockaddrs returned by getaddrinfo().
Thanks to Miles Nordin for spotting this.

18 years agoRestore length of the original packet in send_udppacket().
Guus Sliepen [Wed, 26 Apr 2006 16:29:47 +0000 (16:29 +0000)]
Restore length of the original packet in send_udppacket().

18 years agoUpdate copyright notices, remove Ivo's email address.
Guus Sliepen [Wed, 26 Apr 2006 13:52:58 +0000 (13:52 +0000)]
Update copyright notices, remove Ivo's email address.

18 years agoFix a bug in handling prefixlengths that are not a multiple of 4.
Guus Sliepen [Wed, 12 Apr 2006 08:38:35 +0000 (08:38 +0000)]
Fix a bug in handling prefixlengths that are not a multiple of 4.
Thanks to Sven-Haegar Koch for spotting the bug and providing the fix.

18 years agoFix signedness compiler warnings.
Guus Sliepen [Sun, 19 Mar 2006 13:06:21 +0000 (13:06 +0000)]
Fix signedness compiler warnings.

18 years agoExport flush_meta().
Guus Sliepen [Sun, 19 Mar 2006 12:43:45 +0000 (12:43 +0000)]
Export flush_meta().

18 years agoMissing #include.
Guus Sliepen [Sun, 19 Mar 2006 12:43:28 +0000 (12:43 +0000)]
Missing #include.

18 years agoMake sure $NAME is set correctly when executing tinc-down script.
Guus Sliepen [Mon, 6 Feb 2006 12:30:51 +0000 (12:30 +0000)]
Make sure $NAME is set correctly when executing tinc-down script.

18 years agoApply patch from Scott Lamb adding an output buffer for the TCP sockets.
Guus Sliepen [Thu, 19 Jan 2006 17:13:18 +0000 (17:13 +0000)]
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.