Commit Graph

2380 Commits

Author SHA1 Message Date
notsecure
9ae2fde0b9 style (again) 2014-05-19 18:55:24 -04:00
mannol
0620d1f064 GOGOGO 2014-05-20 00:48:53 +02:00
mannol
c9f1c6882d Merge upstream fo real now? 2014-05-20 00:27:02 +02:00
mannol
a1f2a18ae4 Merge upstream and other stuff 2014-05-20 00:10:40 +02:00
notsecure
410294da48 style, failure check on realloc 2014-05-19 17:53:29 -04:00
stal
8e5e89b871 configure.ac: Don't check for clock_gettime on OS X
We don't need it anymore. jin-eld pls do not kill
2014-05-19 14:43:36 -07:00
notsecure
987a8d9850 tcp relay sharing (PACKET_ID_SHARE_RELAYS) 2014-05-19 17:39:50 -04:00
notsecure
fe66fcc7e4 list
Simple struct with functions to create a list which associates ids with
data
2014-05-19 16:42:09 -04:00
irungentoo
fc19327dcc
Merge branch 'notsecure-master' 2014-05-19 14:22:43 -04:00
notsecure
d27a83820c added missing ipport_pack 2014-05-19 14:18:26 -04:00
irungentoo
e85feb8a3d
Fixed a bug where someone could just send back the ping request packet
with only the first byte set to 1 instead of 0 and the public key set
to the one of the reciever as a valid response packet.

This breaks network compatibility with all previous cores.
2014-05-19 12:56:36 -04:00
notsecure
ede8455a5a function comments in header 2014-05-19 11:56:45 -04:00
notsecure
cecefd290a mistakes
forgot to build before pushing
2014-05-19 11:34:40 -04:00
irungentoo
8cec3cdd66
Merge branch 'bootstrap-daemon-improvements' of https://github.com/nurupo/InsertProjectNameHere into nurupo-bootstrap-daemon-improvements
s
2014-05-19 10:59:35 -04:00
irungentoo
116f3d46e8
Removed now useless code. 2014-05-19 10:57:56 -04:00
notsecure
0d711afbec IP_Port packing unpacking in onion.c 2014-05-19 09:18:04 -04:00
Maxim Biro
286d8d9661 Made config file more consistent with default values 2014-05-18 21:04:42 -04:00
Maxim Biro
fe1694fa69 Added default ports to the .c file, included 33445 port 2014-05-18 19:59:01 -04:00
Maxim Biro
261a70353f Fixed a bug 2014-05-18 19:59:01 -04:00
Maxim Biro
8b5e3d5208 Allow multiple instances of the daemon 2014-05-18 19:58:57 -04:00
irungentoo
207e87187d
libsodium header should only be included when libsodium is used. 2014-05-18 18:17:42 -04:00
stal
28c5665a08
Fix current_time_monotonic on OS X.
clock_gettime doesn't exist there, so
throw in some equivalent mach stuff.
2014-05-18 14:56:35 -07:00
irungentoo
77d2ad373a
Fixed IP_Port packed struct being 1 byte too big on windows. 2014-05-18 16:07:26 -04:00
irungentoo
906969d376
Fixed out of bounds write. 2014-05-18 14:43:32 -04:00
irungentoo
0035cfac37
Merge branch 'tcp-bootstrap-daemon' of https://github.com/nurupo/InsertProjectNameHere into nurupo-tcp-bootstrap-daemon 2014-05-18 14:22:58 -04:00
irungentoo
376eecafd3
Fixed possible connection issue. 2014-05-18 13:58:41 -04:00
irungentoo
d68197b895
Save a couple TCP relays on save and reconnect to them on load.
Removed some old code.
2014-05-18 13:45:33 -04:00
irungentoo
8cb3ddda8b
Fixed TCP client connection isse. 2014-05-18 12:59:21 -04:00
irungentoo
d573271f03
Fixed connection issue. 2014-05-18 12:15:57 -04:00
irungentoo
e87929e869
TCP branch now ready for start of real testing.
Friends can now exchange TCP relay addresses so that they can
connect together.

Currently all bootstrap nodes are treated as TCP relays.
2014-05-18 10:55:38 -04:00
Maxim Biro
7dd811214a Added MOTD functionality 2014-05-18 00:38:20 -04:00
Maxim Biro
e75930e72e Some small fixes 2014-05-17 21:49:57 -04:00
Maxim Biro
8be6b0986d Extracted min and max allowed port values into named constants 2014-05-17 21:49:51 -04:00
irungentoo
9d4947ffa5
add_tcp_relay_peer() can be used to add relays that we know that
peer is connected to.

Some cleanups/fixes.
2014-05-17 21:30:52 -04:00
Maxim Biro
ceaeae8cff Added TCP server functionality 2014-05-17 20:36:16 -04:00
mannol
ea96c1758a Fixed this 2014-05-17 23:15:54 +02:00
irungentoo
b5f84b33f7
net_crypto now works again on pure UDP. 2014-05-17 15:23:16 -04:00
irungentoo
60ed415a5a
Added a function to get the DHT public key stored in net_crypto.
The DHT public keys in onion_client/net_crypto are synced and set
to whichever is more recent.

Tox peers now try to connect directly even when already connected
with a TCP relay.
2014-05-17 14:56:20 -04:00
irungentoo
80e4e5663f
Fixed bug in TCP server where memory was expected to be zero but
sometimes wasn't.
2014-05-17 14:29:28 -04:00
irungentoo
3aef4711ce
Added function to set the DHT public key in onion_client. 2014-05-17 13:16:58 -04:00
irungentoo
a5da6df144
Net_crypto can now handle packets sent as TCP OOB packets.
Added timestamp to know which DHT public key is good in case
onion_client and net_crypto report different ones.
2014-05-17 12:33:22 -04:00
irungentoo
454cadb91c
Changed cookie/cookie request packet.
Cookie now contains the dht public key of the peer which makes
more sense than including the real public key of the reciever.

It means we no longer have to rely entirely on onion_client to
find the dht public key of the other peer.
2014-05-17 09:21:07 -04:00
irungentoo
86c191c2d4
Fixed typo. 2014-05-16 17:50:26 -04:00
irungentoo
3ab05b6e2e
Some TCP code added to net_crypto.
add_tcp_relay() can be used to connect to some TCP relays.

If both Toxes are connected to the same TCP relay(s) and create a
connection on which they set the others dht_public_key, they will
connect.
2014-05-16 17:29:50 -04:00
irungentoo
933428b899
Removed non spec behaviour. 2014-05-16 14:09:46 -04:00
mannol
843171fbc8 This works. 2014-05-16 19:56:40 +02:00
irungentoo
1f7d8b71f0
Fixed TCP_client connections not timing out correctly. 2014-05-16 13:42:19 -04:00
irungentoo
cda3cedd37
TCP_server fix.
Clear the connections array when connection is killed.

Don't allow duplicate entries in connections array.
2014-05-16 12:43:53 -04:00
irungentoo
297281dea5
Fixed some issues in TCP_server.
Timed out connections now remove themselves correctly.

If a peer with the same public key as another tries to connect,
the old connection is killed.
2014-05-16 11:26:41 -04:00
irungentoo
a514167952
Exposed and tested disconnect notification TCP packets. 2014-05-15 20:57:55 -04:00