Commit Graph
446 Commits
Author SHA1 Message Date
Lee Smet cba9bafee3 Close #46: Don't send update for route to next-hop
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-13 16:02:49 +01:00
Lee Smet d166163d57 Close #49: Add source entry expiration timers
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-13 14:59:58 +01:00
Lee Smet 1f10cab765 Fix #56: Don't update source entry for retractions
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-13 11:40:15 +01:00
Lee Smet d71e94f01d Fix #54: Enforce hops to have a cost
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-13 11:33:25 +01:00
Lee Smet 687666a5e2 Fix #52: Don't include peer link cost in update
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-13 11:27:12 +01:00
Lee Smet ddb95d3da4 Fix #51: Properly handle retractions
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-10 18:16:18 +01:00
Lee Smet 9d067bab54 Don't remove infinite metric when adding
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-10 17:52:41 +01:00
Lee Smet 40626b8bcd Don't forward packets over fallback route
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-10 17:52:17 +01:00
Lee Smet 11aa41155a Fix #50: Allow fallback only routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-09 15:41:02 +01:00
Lee Smet 7bf155644c Clean up dead code
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-08 19:50:22 +01:00
Lee Smet 219749a486 Fix #47: Better update handling and route selection
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-08 19:47:58 +01:00
Lee Smet e57930ad7e Improve sending updates
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-08 18:27:32 +01:00
Lee Smet a0a1b41165 Add update filter to ensure router id owns subnet
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-08 10:54:29 +01:00
Lee Smet 0cdedb51e4 Fix handling of seqno requests for local routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 18:11:49 +01:00
Lee Smet 1e6ebbc8fb Fix comment on SeqNoRequest
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 17:53:21 +01:00
Lee Smet d320ac6c8d Also print route seqno
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 16:52:03 +01:00
Lee Smet 3cc6e5e439 Add SeqNoRequest tests
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 16:01:52 +01:00
Lee Smet c57126858f Send seqno requests in update handler
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 14:58:38 +01:00
Lee Smet 14ff3de87f Add more peer underlay debugging info
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 12:06:42 +01:00
Lee Smet c9d1bf10f7 Add source peer underlay IP to update log
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 12:01:09 +01:00
Lee Smet a14d4b7569 Also drop read handle if route is for ourselves
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 11:52:27 +01:00
Lee Smet b6d3b98eed Implement SeqNo request and handling
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-07 11:45:41 +01:00
Lee Smet 4f2da4b4f7 Use more constants for router timings
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-06 15:45:40 +01:00
Lee Smet a2c44e68db Add debug log when sending update
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-06 14:53:53 +01:00
Lee Smet d5b641e7dc Set proper seqno when distributing routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-06 14:16:11 +01:00
Lee Smet cd10da1056 Add log when connecting to peer
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-06 13:22:01 +01:00
Lee Smet f608849fcd Fix #41: Harden peer exchange handshake
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-06 11:46:01 +01:00
Lee Smet 880160673b Also print cli message resp in decoded form
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-06 11:26:30 +01:00
Lee Smet 67981388e1 Vendor openssl for now
To unblock musl static builds

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 18:03:36 +01:00
Lee Smet 5d3130c91c Add basic docs about the current message system
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 17:53:53 +01:00
Lee Smet 0444ef0dfa Update api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 17:32:17 +01:00
Lee Smet 6f777d74f5 Rename message info fields to camelCase
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 17:29:42 +01:00
Lee Smet e1aa5bca5a Change reply_to into reply-to
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 17:26:56 +01:00
Lee Smet dfc6eef755 Correct URL when sending reply
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 17:22:41 +01:00
Lee Smet 548b076059 Add message subcommands
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 17:19:42 +01:00
Lee Smet b673611b7e Add extra documentation for --no-tun on CLI
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 11:42:00 +01:00
Lee Smet 0cecc5d528 Add error log if set route or addr on TUN fails
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 11:40:07 +01:00
Lee Smet 0d65c433f8 Correct typo when running with TUN on non linux
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 11:38:05 +01:00
Lee Smet cc122f4325 Enable mycelium info logging by default
Also add a flag to enable debug logging. It is no longer needed to add
the RUST_LOG=mycelium=... variable to enable logging (and it won't work
anymore to set the log level).

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-03 10:35:14 +01:00
Lee Smet 69ae5648b0 Allow compilation on non linux platforms
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 18:21:30 +01:00
Lee Smet aac6081e6e Add reply methods to API spec
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 17:46:33 +01:00
Lee Smet 90a9f2781c Add message reply functions
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 17:30:04 +01:00
Lee Smet e2e4e93205 Improve printing of routes/sources
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 14:30:31 +01:00
Lee Smet c9b2a7672f Trunate node subnet
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 13:28:50 +01:00
Lee Smet bf76a1d702 Check for peer equality by checking Arc pointers
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 12:58:56 +01:00
Lee Smet c45ece2bf0 Rework peer to reduce size in memory
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 12:01:12 +01:00
Lee Smet 29a6e35cf1 Clean up peer manager
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-11-02 11:34:54 +01:00
Lee Smet fab8d02965 Specify --no-tun flag in README.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-10-30 10:16:34 +01:00
Lee Smet 7d4628a295 Fix api doc LICENSE link
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-10-27 16:12:07 +02:00
Lee Smet 7b65d6cf63 Expand README.md with new features
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2023-10-27 16:11:06 +02:00