72e3f6532a
Drop compatiblity code for fastd 0.4
2013-10-29 17:00:38 +01:00
4356714142
Handle methods as strings
2013-10-29 15:33:14 +01:00
bb324029ad
Allow using libsodium instead of NaCl
...
As libsodium has some strange include files (like a version.h), we try to use
absolute include paths whenever possible in fastd now and rename our generated
headers.
2013-10-29 03:45:34 +01:00
fc8c8d82f0
Unify duplicate code in xsalsa20-poly1305 and aes128-gcm methods
2013-10-28 18:31:02 +01:00
095ca93d81
Organize method and protocol source files into distinct source directories
2013-10-28 16:59:42 +01:00
5f6177e00f
Fix maybe-uninitialized warning
2013-10-24 21:02:53 +02:00
004ae15c55
Don't print fastd version from handshake requests when secure handshakes are set, instead print it on handshake finish
2013-10-20 20:18:26 +02:00
115de59c32
Warn when no encryption method is set
2013-10-20 19:17:49 +02:00
78c5d1284c
Don't send chosen method name when it doesn't matter
2013-10-20 17:08:04 +02:00
b3c602a025
Align handshake buffer
2013-10-20 03:03:05 +02:00
90eeceb9ed
Always check for mode and protocol mismatches
...
This was accidentially disabled in the previous commit for initial handshake
requests.
2013-10-20 02:55:38 +02:00
8cbd59792e
Refactor handshake code, prevent downgrade attacks
2013-10-20 02:37:04 +02:00
e4afa04870
Rename RECORD_HANDSHAKE_MAC to RECORD_TLV_MAC
2013-10-19 18:09:44 +02:00
18a3a6468e
Authenticate the TLV records only
2013-10-19 17:57:23 +02:00
0ce0b04490
Use the rsv2 field in the handshake header as an optional length field to facilitate future extensions
2013-10-19 17:37:09 +02:00
c03f985b99
Get rid of packet.h
2013-10-19 17:12:49 +02:00
7982387d5f
Add a HMAC to authenticate all handshake TLV
2013-10-19 15:54:46 +02:00
6d8aa57c02
Generalize SHA256 functions to work with arbitrary inputs
2013-10-18 16:18:20 +02:00
5a025b23be
Use the default delay before a handshake is sent when the local address is invalid
...
Sending it right away will make crossed handshakes more probable which is
especially painful when roaming, so it's better to add the delay.
2013-10-17 00:12:15 +02:00
8ff7026b0e
Add `secure handshakes' option (without effect for now)
...
Not setting the option produces a warning (so not having it set is deprecated
now), so we can change the default from no to yes in a few release cycles.
2013-10-16 20:37:16 +02:00
118ebb9d65
Initiate handshake when a packet can't be sent because the local address is invalid
2013-10-16 18:33:51 +02:00
4c188ac861
Fix fast roaming when local IP address has changed
2013-10-16 12:07:45 +02:00
ecebe8a755
New development cycle
2013-10-16 12:07:32 +02:00
84e3d7a16b
fastd v10
2013-10-11 16:32:12 +02:00
4a7d1acb59
Fix source address choice for IPv4 on Linux
2013-10-04 09:10:03 +02:00
9d950241cd
Invalidate null sessions when they are superseded
2013-09-30 22:15:54 +02:00
6ed43cdc22
fastd v9
2013-09-07 17:30:46 +02:00
467cc0f6c2
Change directory to / when privileges are dropped or the user is changed
2013-09-06 17:13:34 +02:00
02c1cb4ce2
Add packet/byte statistics
2013-09-03 21:53:45 +02:00
f0fa4e0c90
Demote some sendmsg warnings to debug and debug2 levels
2013-08-30 12:57:25 +02:00
7f33ccb920
Don't initialize monotone timestamps with zero
...
The monotone timestamp is near zero on linux systems, confusing fastd.
2013-08-29 19:04:31 +02:00
620f1cd45f
Replace old task queue
...
The handshakes are now schedules in a doubly-linked list that is maintained as a
part of the peer structure.
2013-08-29 11:53:34 +02:00
dcaf41a18e
Simplify keepalive sending
...
By using a global keepalive timer, the O(n) keepalive queue purge operation on
every send operation is avoided.
2013-08-29 00:45:13 +02:00
2343f5329c
ec25519: ensure old sessions are invalidated quickly after a new one has been established
2013-08-28 19:54:11 +02:00
6e63479b03
Remote unused fastd_task_replace_peer()
2013-08-28 15:50:37 +02:00
72b8ec6a93
ec25519: ensure that there is always a handshake enqueued after sending a handshake finish
...
This ensures that the handshake is repeated in case the finish packet is lost.
2013-08-28 15:45:43 +02:00
1b9709bae3
ec25519: reset peers as soon as their current session times out
2013-08-28 15:45:35 +02:00
3a3d423920
Cancel the session establishment earlier when the address can't be claimed by the peer
...
There is no reason to run through all the session establishment just to cancel
it a moment later.
2013-08-28 14:13:44 +02:00
738639cf71
Introduce constants for tristate values
2013-08-28 13:39:18 +02:00
81bff2df03
Introduce new log level debug2 for potentially very frequent messages
2013-08-27 17:57:06 +02:00
e91f17de87
options: change config error' to
command line error' messages
2013-08-26 14:57:39 +02:00
81a329682b
ec25519-fhmqvc: use different handshake keys as initiator and responder
...
This ensures that even in the unlikely case of a crossed handshake fastd will
never establish two sessions with the same encryption key
2013-08-25 21:20:18 +02:00
464b4ed42e
ec25519-fhmqvc: put public and secret keys together in a keypair structure
2013-08-25 20:45:33 +02:00
9aff9fc56e
Fix typo in systemd unit description
2013-08-21 11:33:32 +02:00
4d2db5dbd2
OpenBSD doesn't support IPv4 on IPv6 sockets
2013-08-20 16:50:51 +02:00
d52f208d9f
Use v4-mapped addresses for IPv4 peers on IPv6 sockets
...
This is needed at least on FreeBSD
2013-08-20 16:16:55 +02:00
f6640a80f4
Prevent zero-before-free operations from being optimized out
2013-08-20 06:52:03 +02:00
d9dc87d840
Fix lots of -Wextra warnings
...
Everything clang and GCC warn about, except GCC's missing-field-initializers
which are just stupid as they don't allow {} syntax to zero a field.
2013-08-20 06:08:07 +02:00
3fd947a2d1
ec25519: add alignment attributes to all keys used as hash inputs
2013-08-19 03:31:57 +02:00
28c9b536f4
ec25519: reorder some code to fix a false-positive "may be used uninitialized" warning
2013-08-19 03:03:46 +02:00