Commit graph

2237 commits

Author SHA1 Message Date
Guus Sliepen
29b42aa17e Fix sending bulk data starting with a newline. 2013-10-22 21:30:17 +02:00
Guus Sliepen
a5bcb29fdf Make sptps_test less verbose by default. 2013-10-22 21:19:41 +02:00
Guus Sliepen
7da999f4ae Clean up child processes from proxy type exec. 2013-10-18 16:58:47 +02:00
Guus Sliepen
9b2eaebdf6 Fix sending empty SPTPS records. 2013-10-15 14:09:42 +02:00
Guus Sliepen
0da0728088 Use AES-256-GCM for the SPTPS protocol.
It is faster than AES-256-CTR + HMAC-SHA256, especially on Intel chips with AES
and PCLMULQDQ instructions.
2013-10-13 01:02:52 +02:00
Guus Sliepen
e42bd60097 Fix typos in the documentation.
Thanks to Thomas Sattler for finding and reporting them.
2013-09-27 11:36:57 +02:00
Guus Sliepen
68e3efe349 Fix segfault when Name = $HOST but $HOST is not set.
Conflicts:
	src/net_setup.c
2013-09-27 11:36:46 +02:00
Guus Sliepen
22d804d446 Link sptps_speed with -lrt.
This is necessary for clock_gettime() on older versions of libc.
2013-09-15 22:03:00 +02:00
Guus Sliepen
c621dd62c7 Don't leak memory during the key generation speed test. 2013-09-15 22:02:33 +02:00
Guus Sliepen
b7b68c3e97 Add a benchmark for the SPTPS protocol. 2013-09-15 17:35:55 +02:00
Guus Sliepen
87b017c710 Avoid using BIOs. 2013-09-15 16:21:25 +02:00
Guus Sliepen
aaa7caad3d Wrong date for the 1.1pre9 release in the NEWS. 2013-09-15 13:36:53 +02:00
Guus Sliepen
85d33e563a Releasing 1.1pre9. 2013-09-08 17:30:40 +02:00
Guus Sliepen
e11daa2646 Don't try to mkdir(CONFDIR) if --config is used. 2013-09-08 15:03:06 +02:00
Guus Sliepen
c25c684a84 Make sure test scripts end up in the tarball. 2013-09-08 14:47:59 +02:00
Guus Sliepen
6072759bcb Automake doesn't like info files being mentioned in CLEANFILES. 2013-09-08 14:42:32 +02:00
Guus Sliepen
b80cbaba04 Test running ping through two tinc daemons.
This is a more complicated test with one tinc daemon using a tap interface
(therefore requiring root), and a second one using a multicast interface. A
separate program "pong" is listening on the same multicast address, and waits
for ARP and ICMP packets, responding to ICMP echo packets with replies.
This test doesn't require any configuration of the tap interface.
2013-09-05 17:42:31 +02:00
Guus Sliepen
fe1d0043c8 Don't return zero-length packets when receiving multicast loopback packets. 2013-09-05 17:41:05 +02:00
Guus Sliepen
2faf3e91af Add two more test scripts. 2013-09-05 15:36:37 +02:00
Guus Sliepen
6242b68242 Fix multicast device. 2013-09-05 14:51:13 +02:00
Guus Sliepen
09b5a3c020 Exit value 1 instead of a random non-zero value. 2013-09-05 14:50:10 +02:00
Guus Sliepen
bdbb710060 Add a test for invite and join commands. 2013-09-02 00:15:50 +02:00
Guus Sliepen
566ef6bcba Also test whether tinc daemons can connect to each other after import/export. 2013-09-02 00:15:18 +02:00
Guus Sliepen
796c14b75c Slightly relax the connection rate limit for a single address.
The restriction of accepting only 1 connection per second from a single address
is a bit too much, especially if one wants to join a VPN using an invitation,
which requires two connections.
2013-09-02 00:11:04 +02:00
Guus Sliepen
933f7f7526 Send a RELOAD to a running tincd when a new invitation key has been generated. 2013-09-01 22:59:51 +02:00
Guus Sliepen
4e7e4818b7 Clean up leftover tincd and sptps_test processes. 2013-09-01 22:59:24 +02:00
Guus Sliepen
b00a6d0666 Fix tincd logfile location when running tests. 2013-09-01 21:55:16 +02:00
Etienne Dechamps
c179dd0fc8 Fix broken build with --with-openssl, --with-libgcrypt.
When --with-openssl is used, $openssl is set to the specified path.
Unfortunately, that confuses the OPENSSL conditional which expects it to
be set to "true". The result is that the contents of the openssl/
directory are not built when --with-openssl is used, resulting in
undefined references and a broken build.

In addition, there is a typo in the GCRYPT conditional definition
("grypt" instead of "gcrypt") which means GCRYPT never gets set,
(presumably) breaking builds using libgcrypt.

These regressions were introduced in
9b9230a0a7.
2013-09-01 21:24:59 +02:00
Guus Sliepen
a4e49f4566 Add test for import, export and exchange commands. 2013-09-01 21:07:02 +02:00
Guus Sliepen
2cd8e2b8e8 Small fixes for tests. 2013-09-01 21:06:25 +02:00
Guus Sliepen
09cd7ac62a Make sptps_test more easy to work with.
It now defers reading from stdin until after the authentication phase is
completed.  Furthermore, it supports the -q, -r, -w options similar to those of
Jürgen Nickelsen's socket.
2013-09-01 16:02:49 +02:00
Guus Sliepen
1cdb0c21d4 Some shells set $_ to an absolute path. 2013-09-01 15:40:59 +02:00
Guus Sliepen
05a7f0b2fb Start of a test suite. 2013-09-01 12:48:31 +02:00
Guus Sliepen
d01ab07f78 Allow testing the replay window with sptps_test. 2013-08-30 14:23:02 +02:00
Guus Sliepen
ccbf70b66f Fix the replay window in SPTPS. 2013-08-30 14:22:05 +02:00
Guus Sliepen
c7752ca73e Fix CTR mode. 2013-08-30 13:43:23 +02:00
Guus Sliepen
d0aa0817d2 Add an option to test datagram SPTPS with packet loss. 2013-08-30 13:04:14 +02:00
Guus Sliepen
5da0ebd421 When generating invitations, handle any order of Port and Adress statements. 2013-08-28 14:24:07 +02:00
Guus Sliepen
f0e11cd2c5 Call WSAStartup() in main().
The tinc utility defered calling WSAStartup() until it tried to connect to a
running tinc daemon. However, socket functions are now also used for other
things (like joining another VPN using an invitation). Now we just
unconditionally call WSAStartup() early in main().
2013-08-27 21:19:50 +02:00
Guus Sliepen
82575bd44d Tell invited node about Mode and Broadcast settings.
Since these settings really should be the same for all nodes in a VPN.
2013-08-24 00:48:24 +02:00
Guus Sliepen
57991e2642 Use PATHEXT when checking for the presence of scripts on Windows.
It seems like a lot of overhead to call access() for every possible extension
defined in PATHEXT, but apparently this is what Windows does itself too. At
least this avoids calling system() when the script one is looking for does not
exist at all.

Since the tinc utility also needs to call scripts, execute_script() is now
split off into its own source file.
2013-08-23 21:23:46 +02:00
Guus Sliepen
21184674b3 Execute scripts when invitations are created or accepted. 2013-08-21 00:24:55 +02:00
Guus Sliepen
9699f08afc Ensure the invitation filenames do not reveal the secret cookie.
Since filenames could potentially leak to unprivileged users (for example,
because of locatedb), it should not contain the cookie used for invitations.
Instead, tinc now uses the hash of the cookie and the invitation key as the
filename to store pending invitations in.
2013-08-20 23:09:36 +02:00
Guus Sliepen
5dec1c2571 Let a server explicitly send a notification when the invitation protocol succeeded. 2013-08-20 22:36:31 +02:00
Guus Sliepen
c798f73093 Use our own infrastructure for finding out the local node's externally visible host name. 2013-08-20 22:18:01 +02:00
Guus Sliepen
160b7cb5e3 Resolve the local host name before generating the invitation file. 2013-08-20 16:47:07 +02:00
Guus Sliepen
65f5e8fba4 Bind outgoing sockets again.
Commit cff5a84 removed the feature of binding outgoing TCP sockets to a local
address. We now call bind() again, but only if there is exactly one listening
socket with the same address family as the destination address of the outgoing
socket.
2013-08-18 23:55:40 +02:00
Guus Sliepen
0c54f36553 Remove broadcast of KEY_CHANGED message during tinc's initialization. 2013-08-18 22:43:55 +02:00
Guus Sliepen
09b0b49b98 Fix order of tincd's initialization.
The order in which tinc initialized things was not completely correct. Now, it
is done as follows:

- Load and parse configuration files.
- Create all TCP and UDP listening sockets.
- Create PID file and UNIX socket.
- Run the tinc-up script.
- Drop privileges.
- Start outgoing connections.
- Run the main loop.

The PID file can only be created correctly if the listening sockets have been
set up ,as it includes the address and port of the first listening socket. The
tinc-up script has to be run after the PID file and UNIX socket have been
created so it can change their permissions if necessary. Outgoing connections
should only be started right before the main loop, because this is not really
part of the initialization.
2013-08-18 22:35:27 +02:00
Guus Sliepen
8f84244458 Don't force a .bat extension for scripts under Windows. 2013-08-18 18:20:41 +02:00