Commit Graph
621 Commits
Author SHA1 Message Date
Lee Smet a16f4e4e38 Reduce tokio feature scope
Instead of using "full", we now only use the features we need. This
removes a few downstream dependencies, shortening build times slightly.

This also means the "parking_lot" feature is no longer enabled. It is
generally accepted that the default std::sync::Mutex which is now used
again by tokio is faster for the general case than the parking_lot mutex
implementation.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-09 11:41:37 +01:00
Lee Smet d8568616fc Update tokio dependency to latest version
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-09 11:07:47 +01:00
Lee Smet 27f81f2b31 Avoid some match complexity in peer_manager
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-09 10:59:20 +01:00
Lee Smet 534328b1bf Group CLI arguments for node itself
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-09 10:57:13 +01:00
Lee Smet 9582b1b2db Bump version to v0.3.2
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-01 14:27:15 +01:00
Lee Smet 1090db367b Always decrement hop count when routing
Previously hop count was not decremented in the ingress path, so the
sending node was omitted in traceroute results

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 17:29:34 +01:00
Lee Smet b6145e0f48 Close #117: Add basic systemd file
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 15:04:41 +01:00
Lee Smet 7041fc2b7f Fix trailing whitespace in CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 14:07:11 +01:00
Lee Smet baff466287 Add route selection change to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 14:01:35 +01:00
Lee Smet 33251c4c52 Close #95: Account for link cost in route select
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 12:56:35 +01:00
Lee Smet 34f158fdf3 Use full path for log::error on windows
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 11:31:13 +01:00
Lee Smet c7b35e5762 Split CLI functions out of main.rs
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-31 11:12:05 +01:00
Lee Smet e446e63a48 Ignore router field on Stack
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-30 16:13:14 +01:00
Lee Smet efdcd14b75 Fix darwin import path in tun module
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-30 16:04:38 +01:00
Lee Smet e56ed5206b Close #111: Move node setup code to lib
This avoids any actual logic in the binary only section, and prepares to
clean up the CLI.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-30 15:53:24 +01:00
Lee Smet 4c3c9da45b Fix #116: Join multicast disc group on all infaces
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-24 15:32:26 +01:00
Lee Smet 4ade07f9a7 Fix #114: Prevent zombie quic connections
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-23 15:32:54 +01:00
Lee Smet 09cff9ff35 Fix obsolete return value in peer::died
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-23 14:32:21 +01:00
Lee Smet f5159c1834 Close #116: Terminate connection of dead peer
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-23 12:44:21 +01:00
Lee Smet f4cef3d84c Remove obsolete comment on peer_manager::new_ref
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-23 12:02:31 +01:00
Lee Smet 95ebcb4c9c Bump version to v0.3.1
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-23 11:16:08 +01:00
Lee Smet db0ce69e79 Log endpoint when we can't connect to it
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-22 15:43:46 +01:00
Lee Smet a2c166d9e0 Move data format code to unix only block
This avoids a clippy error on windows where this code is not used

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-22 15:26:53 +01:00
Lee Smet 2ca65b58e1 Close #103: Document key-file flag for inspect cmd
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-22 15:11:19 +01:00
Lee Smet d0238c9cd8 Update dependencies
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-22 15:03:49 +01:00
Lee Smet a35146f7ba Add bandwidth tracking to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-22 14:57:39 +01:00
Lee Smet c42512cbe6 Close #109: Track peer bandwidth usage
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-22 14:56:32 +01:00
Lee Smet 22e157d9b2 Add -V/--version flag to print binary version
Version is set to the value in Cargo.toml

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-20 12:12:40 +01:00
Lee Smet f75ec87d3c Update tokio dependency to v1.35
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-19 14:22:33 +01:00
Lee Smet 409a19df28 Close #100: Harden prefix decoding
Prefix decoding copies based on the earlier specified plen. For IPv4 and
IPv6, these have an implied maximum of 32 and 128, respectively. Since
that is not checked, a remote node could supply a value which is too
high, which in turn cuases the copy to read too many bytes, or to copy
outside of the destination bound. Both of these scenarios result in a
panic. That panic would only affect the connection of that remote peer
and leave the remainder of the system intact, so no real harm is done.

Now, we cleanly return a None value. We don't attempt to skip bytes to
leave the buffer in a known good state, and most likely a following read
will find a bad frame. Ultimately, this would lead to the connection
dying due to no IHU's being received.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-18 15:10:08 +01:00
Lee Smet 002563cc82 Fix tag compare for v0.3.0 in CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 18:14:25 +01:00
Lee Smet 05d8f6869e Bump version to v0.3.0
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 16:02:00 +01:00
Lee Smet bc0b0334c5 Add recent changes to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 15:44:48 +01:00
Lee Smet 2e58fa28e6 Fix update tests
Which were forgotten to be changed in the previous 2 commits

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 15:39:15 +01:00
Lee Smet 4b0df422a8 Fix size calculation for update packet
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 15:38:42 +01:00
Lee Smet 94f09c430c Fix #99: Proper address encoding in update TLV's
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 15:22:56 +01:00
Lee Smet b70fa579ed Fix skipping of unknown TLV's
Since we already read a TLV type and TLV len byte, we need to decrement
the header length by 2 instead of 1

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 15:07:29 +01:00
Lee Smet 191da7ed18 Close #88: Relax timing of periodic events
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 14:52:55 +01:00
Lee Smet c0d99dd23a Remove obsolete sleep in expired route key removal
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 12:55:41 +01:00
Lee Smet afba7443ae Close #106: Inform peers if they died
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 11:54:52 +01:00
Lee Smet 5ba38c68ac Fix trace log typo
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-17 11:54:22 +01:00
kristof de spiegeleer 6c62845fe2 Update README.md
Signed-off-by: kristof de spiegeleer <kristof@incubaid.com>
2024-01-12 15:00:20 +02:00
kristof de spiegeleer 43a8a48dbe Update README.md
Signed-off-by: kristof de spiegeleer <kristof@incubaid.com>
2024-01-12 14:42:08 +02:00
kristof de spiegeleer 773cac54a7 Update README.md
Signed-off-by: kristof de spiegeleer <kristof@incubaid.com>
2024-01-12 14:41:37 +02:00
Lee Smet 8b147eea89 Close #96: Forget LL peers on connect failure
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-12 11:45:18 +01:00
Jan De Landtsheer 22c4022b0d fish redirect > needs spaces
fish quoted string is 1 string to mycelium
2024-01-09 19:55:09 +01:00
Lee Smet a9c6d0b6c4 Close #101: Request route table dump for new Peer
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-09 15:53:43 +01:00
Lee Smet 52648fe502 Add Route Requests to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-09 14:18:34 +01:00
Lee Smet a1aa5102a0 Close #94: Add route requests
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-09 14:14:10 +01:00
Lee Smet b9678d7810 Add seqno request codec test
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-01-09 14:14:10 +01:00