Commit Graph

130 Commits

Author SHA1 Message Date
ynerant b2b1d62cc0 Merge branch 'multicast' into 'master'
Multicast

See merge request ynerant/squinnondation!10
2021-01-09 22:30:00 +01:00
Yohann D'ANELLO 414173c0eb
Replace RLock by Semaphore 2021-01-09 21:45:50 +01:00
Yohann D'ANELLO 4b9d3501a1
Add timeout of 1 second for each acquire 2021-01-09 21:42:44 +01:00
eichhornchen 6aa714ef4c Cleaning files. 2021-01-09 21:32:17 +01:00
Yohann D'ANELLO e3adc73d01
Copy recent messages before cleaning them 2021-01-09 21:07:08 +01:00
Yohann D'ANELLO dbf3953ad4
Reduce length by 1 if there is a trailing zero at the end 2021-01-09 20:56:02 +01:00
Yohann D'ANELLO d8cabcc6a3
DataTLV is not subscriptable 2021-01-09 20:52:17 +01:00
Yohann D'ANELLO 8f3b7cd9d2
Inundation is more thread-safe 2021-01-09 20:41:12 +01:00
Yohann D'ANELLO 4a79fcaabe
Prevent curses errors 2021-01-09 20:38:13 +01:00
Yohann D'ANELLO 2797b9ddc5
Allow other clients to add a trailing zero at the end of a data 2021-01-09 20:36:32 +01:00
Yohann D'ANELLO ed00fd73d1
Fix inundation concurrency issues 2021-01-09 20:13:02 +01:00
Yohann D'ANELLO eb97a47a25
Warn other user is the data contains a zero 2021-01-09 20:09:53 +01:00
Yohann D'ANELLO ea5da5656f
Fix colors when we can't change colors (eg. in a TTY) 2021-01-09 18:14:48 +01:00
Yohann D'ANELLO c136f34d9c
Refresh screen when needed 2021-01-08 19:11:46 +01:00
Yohann D'ANELLO bf130f1ede
Remove debug code 2021-01-08 18:55:18 +01:00
Yohann D'ANELLO 369befcd79
💩 code 2021-01-08 18:50:10 +01:00
Yohann D'ANELLO 380f808e50
Merge hazelnuts that have the same id 2021-01-08 17:52:27 +01:00
Eichhornchen 57cdfebff4 ... 2021-01-07 18:32:25 +01:00
Eichhornchen 55b9eac037 prefer not multicast port addresses 2021-01-07 18:25:05 +01:00
Eichhornchen a8d38faa62 better? 2021-01-07 18:13:20 +01:00
Eichhornchen eae4f13066 Removes somr locks that were blocking the threads 2021-01-07 17:48:56 +01:00
Eichhornchen 7e1323dc74 Multicast mode can be turned off (it does not really work, so... 2021-01-07 17:12:33 +01:00
Eichhornchen f8fa48f274 reapired multicast 2021-01-07 15:50:32 +01:00
Eichhornchen 850b4ed78b ... 2021-01-07 15:39:35 +01:00
eichhornchen 1702d258bf multicast 2021-01-07 15:06:23 +01:00
eichhornchen df3298a39c suppress the superfluous hazel.py file. 2021-01-07 11:20:49 +01:00
eichhornchen 25e502ab45 Merge branch 'commands' into 'master'
Commands

See merge request ynerant/squinnondation!8
2021-01-07 11:13:38 +01:00
Eichhornchen 15917bfb32 Added a fix to avoid becoming one's own neighbour. 2021-01-06 22:04:23 +01:00
Eichhornchen ab554bb3fe Cleaned the names + put the lock back (I assure you it's necessary) 2021-01-06 21:47:07 +01:00
Yohann D'ANELLO be6abe2557
Linting 2021-01-06 15:50:29 +01:00
Yohann D'ANELLO 40a22b20c8
Fix markdown command 2021-01-06 15:48:02 +01:00
Yohann D'ANELLO fdc89bfe53
Remove debug code 2021-01-06 15:46:58 +01:00
Yohann D'ANELLO bd024c3d31
Manage suppr key, fix backspace 2021-01-06 15:45:52 +01:00
Yohann D'ANELLO 89bb6ddc3a
Manage commands 2021-01-05 23:59:35 +01:00
Yohann D'ANELLO acd9b157b9
Add docstring for the update table function 2021-01-05 22:36:09 +01:00
Yohann D'ANELLO 084f512d34
Check that packet length is good 2021-01-05 22:01:49 +01:00
Yohann D'ANELLO eb0098552a
Banned clients are not potential clients 2021-01-05 21:50:29 +01:00
Yohann D'ANELLO 1db72e71dc
Banned clients are not potential clients 2021-01-05 21:17:44 +01:00
Yohann D'ANELLO edb738bffb
Don't log banned users too much 2021-01-05 21:08:52 +01:00
Yohann D'ANELLO dc9f836932
When merging clients, merge also error count 2021-01-05 21:04:08 +01:00
Yohann D'ANELLO 5bb4748056
Warn users when they send poop messages and ban them if they are too many 2021-01-05 20:55:04 +01:00
Yohann D'ANELLO 0a4ebd0c92
An unknown client can only send HelloTLV and GoAwayTLV for security 2021-01-05 20:38:19 +01:00
Yohann D'ANELLO f062ee7b13
Use hazelnut sets instead of dictionaries to avoid duplicate hazels 2021-01-05 20:26:22 +01:00
Yohann D'ANELLO c7c8765fad
Fix the warnings when a hazel use a different id/nickname that was previously known 2021-01-05 20:21:13 +01:00
Yohann D'ANELLO 2d670a56a1
Merge clients that have the same id if it speaks on multiple addresses 2021-01-05 20:05:19 +01:00
Yohann D'ANELLO 56020390b2
activehazelnuts -> active_hazelnuts 2021-01-05 19:19:43 +01:00
Yohann D'ANELLO f85b088367
Don't need to use a lock when manipulating packets 2021-01-05 19:17:33 +01:00
Yohann D'ANELLO 915dc3ec24
Clients can have multiple addresses 2021-01-05 19:13:07 +01:00
Yohann D'ANELLO 5ffe0d21c3
A hazelut is either active or potential 2021-01-05 18:25:55 +01:00
Yohann D'ANELLO 95a2501e49
Update the full hazelnuts table when adding a new potential neighbour 2021-01-05 18:22:34 +01:00