Commit Graph

20 Commits

Author SHA1 Message Date
Asim Aslam
47acdf6a4b move Table to table 2019-07-29 12:40:13 +01:00
Milos Gajdos
96f9ce1bd3
Proper router stopping. Printable router status. 2019-07-27 16:11:06 +01:00
Milos Gajdos
d8b00e801d
Stop watcher when router stops. Drain advert channel when stopping. 2019-07-27 16:11:06 +01:00
Milos Gajdos
e22c4b4c07
table package is no more. Cleaned up unnecessary code, too. 2019-07-27 16:04:08 +01:00
Milos Gajdos
13a8cfe7f3
Small function documentation update 2019-07-24 17:22:27 +01:00
Milos Gajdos
1e94d9fe5a
Router cleanup and refactoring for win and profit.
This commit adds the following changes to router package:
* it refactors Advertise() function which now does only what
it claims to do: advertising
* various router packages functions/methods have been renamed to make
their functionality more obvious and more in line with what they actually do
* function documentation changes related to the above bullet points
2019-07-24 17:16:52 +01:00
Milos Gajdos
94b6455577
Increment WaitGroup before launching advertiseEvents goroutine 2019-07-17 13:02:47 +01:00
Milos Gajdos
2803146673
Renaming rampage
Addressing the comments in #591, router.String() now returns "default"

Furthermore, a tonne of other renaming has been included in this commit
as a result of running go vet ./... inside the router package.
2019-07-17 00:06:11 +01:00
Milos Gajdos
92495d22db
Fixes advert dampening behaviour.
This commit adds the following changes:
* advert now stores a list of route events as opposed to just last one
* attempt to dedup route events before appending them to advert
* have max suppress threshold for long time suppressed adverts
* decaying events on every advert tick

Originally we werent decaying penalties on every advert tick.
That was incorrect behaviour. Furthermore some events would end up being
accumulated potentially causing memory leaks.

We were also overriding the last received router event which was causing
incorrect sequence of events to be applied when received by a receiver:
Create, Delete would be "squashed" into Delete only which would be
nonsensical since the Create event would never be delivered hence we
would be deleting nonexistent routes.

Not Decaying the events on every tick or not having the max suppression
threshold could lead to DoS by growing the router memory infinitely.
2019-07-16 19:00:25 +01:00
Milos Gajdos
35a1de91a9
Advertise full table every minute. 2019-07-11 12:39:20 +01:00
Milos Gajdos
a0ee7d2092
Added update action to manageServiceRoutes. Table is embedded; skip opts 2019-07-10 21:28:32 +01:00
Milos Gajdos
8f5aed707e
Table.Add is now Table.Create. Insesrt event is now Create event. 2019-07-10 17:46:22 +01:00
Asim Aslam
0a1b657221 visual cleanup of router code 2019-07-10 07:45:27 +01:00
Milos Gajdos
23cb811f60
Removed fmt.Stringer artistry from all roouter and table structs 2019-07-09 16:17:18 +01:00
Milos Gajdos
c5fb409760
Removed debug logs 2019-07-09 15:55:39 +01:00
Milos Gajdos
70665e5a7d
Route has changed to accomodate Link, Service and Address 2019-07-09 15:46:32 +01:00
Milos Gajdos
449aa0a339
Collect ANNOUNCE mesage events before adding default gateway. 2019-07-09 15:46:31 +01:00
Milos Gajdos
265271008e
Simplified processEvents loop; Added router Announcement. 2019-07-09 15:46:31 +01:00
Milos Gajdos
b82245429e
Simplified table logic. Lookup tests. mucp/cient update 2019-07-09 15:46:31 +01:00
Milos Gajdos
cc590f5f2c
Table now has a dedicated package inside router package. 2019-07-09 15:46:31 +01:00