Commit graph

396 commits

Author SHA1 Message Date
Stephen Birarda
5cbddfe0c4 consider all sockets in findNodeWithAddr 2018-10-23 13:35:07 -07:00
Stephen Birarda
3aac294a92 optimize sockAddrBelongsToNode and reduce connection filter usage 2018-10-22 13:57:30 -07:00
Simon Walton
7af69b5450 Check that a requested listened port is used in NodeList 2018-09-04 13:53:25 -07:00
Simon Walton
3002abeddc Add DS option to turn off packet authentication 2018-07-18 18:22:36 -07:00
John Conklin II
d66ed07061
Merge pull request #12901 from kitely/fix-banning-users
Fixed banning users
2018-06-14 09:33:28 -07:00
John Conklin II
bc9e403ab9
Merge pull request #13005 from SimonWalton-HiFi/hmac-auth2
Use HMAC authentication for network packets - 2nd attempt
2018-05-10 14:38:18 -07:00
Stephen Birarda
12f7dd93dc
Merge pull request #13068 from birarda/67-to-master
merge RC67 back to master
2018-05-01 17:24:46 -07:00
Simon Walton
bbcb07d9ab Brute force it with isDomainServer() 2018-05-01 15:07:44 -07:00
Simon Walton
0627099667 In packetSourceAndHashMatchAndTrackBandwidth() check LocalID after check for DS source
Makes check more robust in case domain server itself reaches this point,
since LimitedNodeList::getDomainLocalID() debug-asserts.
2018-05-01 14:33:48 -07:00
Stephen Birarda
ed47cd8458 add a missing unsafe_erase for local node ID map 2018-04-30 12:35:48 -07:00
Stephen Birarda
9f25103b09
Merge pull request #12972 from sethalves/fix-linux-clang-build
fix linux clang build
2018-04-26 10:46:51 -07:00
Simon Walton
9ef56c44a3 Merge PR12964 to not use verification if not keyed
https://github.com/highfidelity/hifi/pull/12964
2018-04-25 17:08:08 -07:00
Simon Walton
21a9525a73 Version of HMACAuth with exposed lock
Client is responsible for locking between adding and
retrieving. Fixes a likely race.
2018-04-24 17:52:12 -07:00
Stephen Birarda
63491588cb Revert "Merge pull request #12690 from SimonWalton-HiFi/hmac-auth"
This reverts commit 7378c87ade, reversing
changes made to 92bf99f436.
2018-04-24 12:44:51 -07:00
Seth Alves
6d8f769cf8 fix linux clang build 2018-04-23 13:18:36 -07:00
Simon Walton
f849d6f937 Change packetSourceAndHashMatchAndTrackBandwidth logging in same manner 2018-04-23 12:26:02 -07:00
Simon Walton
9f9a68188d Merge remote-tracking branch 'upstream/master' into short-id 2018-04-20 11:10:21 -07:00
John Conklin II
7378c87ade
Merge pull request #12690 from SimonWalton-HiFi/hmac-auth
Change packet authentication to use HMAC
2018-04-20 09:54:25 -07:00
John Conklin II
92bf99f436
Merge pull request #12786 from huffman/fix/node-list-connections
Fix avatars not coming back when briefly disconnected from avatar mixer
2018-04-20 09:53:50 -07:00
Simon Walton
01c39d4310 Use NULL_LOCAL_ID in more places, as requested by review 2018-04-18 11:53:47 -07:00
Oren Hurvitz
de0ea15f0a Fixed based on PR review 2018-04-18 10:26:55 +03:00
Oren Hurvitz
e610443353 Fixed banning users: it didn't work because we tried to send a Reliable packet using sendUnreliablePacket() 2018-04-16 15:36:37 +03:00
Ryan Huffman
2546ff91ca Fix nodelist connections not resetting on both ends
This change adds a connection ID to ping packets. Each node keeps a
connection id for each other node that it has connected to. When a node
is removed the connection id is incremented. If a node sees another node
with a higher connection id, it will reset its connection with the new
connection id, ensuring that local state is reset on both ends when
nodes lose contact.
2018-04-04 11:53:05 -07:00
Simon Walton
692ccfc09b Create HIFI_FCDEBUG(_ID) variants that require a category
Original macros use default settings.
2018-04-04 09:49:15 -07:00
Simon Walton
7d16ca9c1c Remove uses of addRepeatedMessageRegex() and its implementation
Change to new log-message ID scheme.
2018-04-03 17:54:01 -07:00
Simon Walton
a7fc6a2991 Repeated logs - use #define to replace qCDebug 2018-04-03 10:44:53 -07:00
Simon Walton
6d078f41e7 Use unique IDs for log strings that should have repeats supressed 2018-04-02 17:32:18 -07:00
Simon Walton
2ba64e1115 LocalID - Use tbb hash map instead of std one for better concurrency 2018-04-02 10:46:38 -07:00
Simon Walton
734b48eee0 Local IDs - Reviewer's suggested improvements 2018-03-30 17:27:52 -07:00
Simon Walton
1b0b280f3a Fix SequenceNumberStats, misc. clean-up 2018-03-29 10:47:11 -07:00
Simon Walton
b409e04734 Handle all case of nodes being deleted from nodelist
Delete erased nodes from local ID mapping, as this uses
SharedPointer. Don't keep the mapping from local IDs
to UUIDs in GateKeeper as it isn't used.
2018-03-28 17:42:23 -07:00
Simon Walton
f823f63211 Add domain local ID to DomainServerList
Also handle domain local ID for 'domain sourced' packets;
bump packet version.
2018-03-28 13:27:43 -07:00
Simon Walton
bed4033554 Local node IDs now working correctly
Move typedef to single location; fixes for replicated packets
(probably still not correct); reserve zero as local ID;
pass domain server's local ID in domain server list;
other tweaks.
2018-03-27 18:18:14 -07:00
Simon Walton
d3464378b7 Short local source IDs - checkpoint
DS assigns 16-bit IDs as well as UUIDs; ACs track mappings;
nodes use short IDs in packets. Initial setup works; then
fails prob. due to DS UUID.
2018-03-27 13:46:58 -07:00
Simon Walton
4ec77e3af6 WIP - assign short IDs to nodes and distribute them. 2018-03-26 14:57:59 -07:00
Simon Walton
755d89464f HMAC Auth - reviewer-requested changes 2018-03-21 17:15:49 -07:00
Simon Walton
eb04f77c3d HMAC Auth - code modifications requested by reviewer 2018-03-21 14:04:34 -07:00
Simon Walton
8ce03d65b7 Only update the connection secret UUID if it changes
Rekeying the openssl HMAC context occasionally causes
hash generation errors. It is not clear why. The Node
secret never seems to change to check for this before
rekeying. Also other clean-up for PR.
2018-03-20 18:16:45 -07:00
Simon Walton
da7298b8bd Support only HMAC - take out passing around of secret UUID
Also other clean-up for production use.
2018-03-19 15:28:44 -07:00
Simon Walton
db8a1ccb3e Set HMAC key once and reuse OpenSSL context
Store the HMAC wrapper in Node. Unfortunately requires a
lot of plumbing down to NLPacket. Added a mutex to the
wrapper since suspicious crashes occurred.
Authentication times seem to be comparable to existing MD5.
2018-03-16 18:03:13 -07:00
Atlante45
85b4c3b422 Protect session UUID from concurrent read/writes 2018-03-02 17:34:18 -08:00
Atlante45
272f95efa2 Specify wich packet can ignore verification at DS level 2018-02-15 10:09:21 -08:00
Ryan Huffman
cb9327e030 Add entity file sync and domain content backups 2018-02-15 10:09:20 -08:00
Atlante45
87f77b6257 Asset Server Backup 2018-02-09 11:32:42 -08:00
Atlante45
482ca3f038 Make type name hash static const 2018-01-18 10:28:43 -08:00
Atlante45
aec5ab5921 CR 2017-12-29 12:46:52 -08:00
Brad Davis
d769acd345 Updating Android toolchain 2017-11-28 11:32:32 -08:00
Stephen Birarda
16d93ee168 clarify signatures in LNL to send packet lists 2017-11-17 11:17:11 -08:00
Atlante45
e68ce97697 Remove the number of socket change tracking 2017-11-15 11:19:54 -08:00
Seth Alves
4d2f16efc3 allow project to be built with clang on Linux 2017-10-08 18:01:41 -07:00