thorkill
ae199d9f2b
Removed type check and debug output.
...
We will send PKT_PROBE in send_sptps_packet only if handshake has been completed.
2016-05-11 19:30:58 +02:00
thorkill
62064cc5ef
Send PKT_PROBE only when handshake has been done already.
2016-05-11 19:30:07 +02:00
thorkill
a84019cf10
Split error handling for accurate log messages in sptps_verify_datagram
...
"Received short packet" was misleading.
2016-05-11 18:51:57 +02:00
thorkill
fe18e0ed29
Reverted changes to try_tx_sptps
...
- should fix the problem with unknown source
at the beginning of communication between nodes
2016-05-11 18:39:15 +02:00
thorkill
41e801cbbd
Revert "Temporal fix for 'unknown source' and broken direct UDP links."
...
This reverts commit 157bc90e64
.
2016-05-10 23:51:22 +02:00
thorkill
0e6265f546
Removed backtrace callback function
2016-05-10 13:43:25 +02:00
thorkill
bd95c231ce
Merge branch 'thkr-1.1-20160510-fix-receive_tcppacket_sptps' into thkr-1.1-ponyhof
2016-05-10 12:01:06 +02:00
thorkill
dc8ee9e6d1
Prevent receive_tcppacket_sptps from forwarding data when we are in handshake phase with those nodes
...
Forwarding data to node which does not have vaildkey yet would destroy
the running handshake.
2016-05-10 11:43:14 +02:00
thorkill
73ae43199c
Allow PKT_PROBE in sptps_send_record
...
sptps_send_record prevented PKT_PROBE to be send in send_sptps_packet.
This occurred mostly when data was on "the wire" for some subnet.
route() would then trigger try_tx/try_udp which would be dropped by
sptps_send_record producing annoying amount of "Handshake phase
not finished yet" log messages.
2016-05-10 00:43:43 +02:00
thorkill
c5f46d3efb
Removed backtrace callback
2016-05-10 00:37:39 +02:00
thorkill
75bca2543d
Tabs vs spaces cleanup.
2016-05-10 00:17:38 +02:00
thorkill
c7d838eb41
Fixed autoconnect after merge
2016-05-08 16:46:29 +02:00
thorkill
08f1fd2f8d
Fixes after merge with guus/1.1
2016-05-08 16:14:20 +02:00
thorkill
e6b85158f0
Added symbols necessary to link with logger.o
2016-05-08 16:12:41 +02:00
thorkill
4be26caf4e
Merge remote-tracking branch 'guus/1.1' into thkr-foor2Vup
2016-05-08 15:58:29 +02:00
Guus Sliepen
2055c3e21d
AutoConnect now only chooses from nodes for which we know an address.
...
Based partially on work from Rafał Leśniak.
2016-04-30 20:11:55 +02:00
Guus Sliepen
8377d0b856
Fix BSD tun device support.
...
This was broken by a botched merge from the master branch in commit d7f6737
.
2016-04-27 20:30:36 +02:00
Guus Sliepen
390d25f0b8
Releasing 1.1pre12.
2016-04-24 13:23:06 +02:00
Guus Sliepen
5a7c6546a4
Don't check file permissions on Windows during fsck.
2016-04-23 21:39:53 +02:00
Guus Sliepen
83fa44ce42
Fix starting tinc as a service on Windows.
...
Don't assume tincd.exe is in the working directory, especially now that
chdir() is called very early. We use GetModuleFileName() instead.
2016-04-23 21:32:42 +02:00
Guus Sliepen
9a66d7499a
Fix a compiler warning on Windows.
2016-04-23 21:32:29 +02:00
Guus Sliepen
ab5f4cbdc6
Fix possible read of freed memory when verifying the signature of a file.
2016-04-23 17:28:30 +02:00
Guus Sliepen
76955a6c8b
Have "tinc fsck" recognize Ed25519PublicKey statements.
2016-04-23 17:20:08 +02:00
Guus Sliepen
51a0dc5145
Fix the "network" command in tinc shell.
2016-04-17 18:11:04 +02:00
Guus Sliepen
b6b302cee9
Speed up AutoConnect at startup.
...
Call periodic_handler() immediately at startup. Also, don't try to
connect to ourself.
2016-04-17 17:06:11 +02:00
Guus Sliepen
f934417aa6
Don't call terminate_connection(myself->connection).
...
It doesn't do anything except give a confusing error message that we are
closing the connection to ourself. Replace it with connection_del().
This also fixes a double free.
2016-04-17 16:25:13 +02:00
Guus Sliepen
2213ecaea5
Handle special characters in sptps_test only if the --special option is given.
...
sptps_test treats lines starting with #, ^ and $ specially, in order to
test the SPTPS protocol. However, this should only be done if explicitly
requested, otherwise it can unexpectedly fail.
2016-04-17 16:01:49 +02:00
Guus Sliepen
c2dc3784f1
Add stricter checks for netnames.
...
When passing a NetName via an invitation, we don't allow any characters
that are unsafe (either because they could cause shells to expand things,
or because they are not allowed on some filesystems).
Also, warn when tinc is started with unsafe netnames.
2016-04-17 14:38:37 +02:00
Guus Sliepen
097c69fc6a
Use ifconfig_header().
2016-04-17 14:36:29 +02:00
Guus Sliepen
af9ee7ff00
Chdir() to the configuration directory instead of /.
2016-04-17 14:04:57 +02:00
Guus Sliepen
0b96b69672
Fix compiler warnings.
2016-04-17 13:55:36 +02:00
Guus Sliepen
a08860ff8c
Fix gateway parsing in invitation files.
2016-04-17 13:55:18 +02:00
Guus Sliepen
6d04528966
Allow gateways to be specified for routes.
...
Also improve the variable names, and ensure the % symbols in
%INTERFACE% are properly quoted.
2016-04-17 13:23:01 +02:00
Guus Sliepen
03878f1215
Move some stray #includes.
2016-04-17 01:13:56 +02:00
Guus Sliepen
3273e32541
Generate a tinc-up script from an invitation.
...
This adds the ability for an invitation to provision an invitee with a
tinc-up script. This is quite strictly controlled; only address configuration
and routes are supported by adding "Ifconfig" and "Route" statements to
the invitation file. The "tinc join" command will generate a tinc-up script
from those statements, and will ask before enabling the tinc-up script.
2016-04-17 01:13:27 +02:00
Guus Sliepen
a31e1f03c4
Stop using SOL_TCP, SOL_IP and SOL_IPV6.
...
Instead, use IPPROTO_TCP, _IP and _IPv6. This fixes an issue on OS X where
it didn't create an UDP socket that listened on IPv4.
2016-04-15 16:56:56 +02:00
Guus Sliepen
a0a8f8f81f
Fix crash at startup when Device is not specified on OS X.
2016-04-15 16:30:45 +02:00
Guus Sliepen
039d6d48af
Fix some compiler warnings from MinGW.
2016-04-15 12:42:30 +02:00
Guus Sliepen
1f5c26102e
Fix generation of version_git.h for some versions of BSD make.
...
In order to support VPATH builds, we have to use ${srcdir}/version.c as
the target for the rule that depends on the generation of version_git.h.
When not doing a VPATH build, ${srcdir} expands to ".", so the target
will be "./version.c". However, on some BSDs, make does not understand
that "./version.c" is the same as "version.c", and therefore it doesn't
trigger generating version_git.h when trying to build version.o. (It
works fine if you do a VPATH build, and OpenBSD's make does the right
thing in all cases.)
The trick is to have version.c depend on ${srcdir}/version.c. Of course,
Linux's make knows this is nonsense and will complain about a circular
dependency, so add this rule only on BSD platforms.
2016-04-15 12:30:01 +02:00
Guus Sliepen
0037ec7cb3
Fix a non-working cast to get rid of a compiler warning.
2016-04-15 12:29:31 +02:00
Guus Sliepen
25bcdad878
Don't use HAVE_SYSTEM, the autoconf check was removed.
2016-04-15 11:38:56 +02:00
Guus Sliepen
cd5f222cc4
Remove use of strcpy() and sprintf().
...
Even though they were safe, compilers like to warn about them nowadays.
2016-04-15 11:25:18 +02:00
Guus Sliepen
d4410d0cce
Don't assume sa.sa_family is a short int.
...
Because FreeBSD's compiler complained about it.
2016-04-15 11:10:50 +02:00
Guus Sliepen
d704a89ecc
Add version_git.h and sample-config.tar.gz to CLEANFILES.
2016-04-15 11:00:14 +02:00
Guus Sliepen
d10834e920
Remove support for Windows 2000 and anything that doesn't support getaddrinfo().
2016-04-14 23:32:50 +02:00
Guus Sliepen
ed09fa4e03
Fix version_get.h generation on BSD.
...
It doesn't like .PHONY rules that are actually doing stuff. So make a really
phony rule that does nothing and depend in it in the version_git.h rule.
2016-04-14 23:01:18 +02:00
Guus Sliepen
2802b3a497
Fix typo in Makefile.am.
2016-04-14 22:59:42 +02:00
Guus Sliepen
46ebfbb6eb
Use getcwd() instead of get_current_dir_name().
2016-04-14 17:29:25 +02:00
Guus Sliepen
b5b04910b9
Replace usleep() with nanosleep().
2016-04-14 17:21:47 +02:00
Guus Sliepen
491839a81a
Fix compiling under MinGW.
2016-04-14 17:05:10 +02:00