Lee Smet
5c2bb2d52c
Simplify expired route if check
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-07-02 11:24:00 +02:00
Lee Smet
e05853c915
Demote seqno cache duplicate request WARN to DEBUG
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-07-02 11:07:20 +02:00
Lee Smet
dbc11a6804
Remove exists flag on RoutingTableIterEntryMut
...
The flag is not needed, since these types are always the result of an
iterator, therefore the returned value always exists.
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-07-02 11:01:28 +02:00
Lee Smet
a08865909b
Reduce the seqno cache backing allocation on sweep
...
The cache seems to stay small when observed on nodes connected to the
network, but still it's good practice to clean up after ourselves. For
now we aggressively shrink as much as possible since the cache is
generally small. If needed (i.e. it is found the cache adds a bunch of
noticeable overhead), we can choose to make this less aggressive in the
future.
Closes #291
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-07-01 16:03:03 +02:00
Lee Smet
42f87b519b
Setup inbound quic connections in separate futures
...
Since the full setup requires waiting for a client to send data, move
this to a separate future collection which gets polled next to the main
accept future. Also limit the amount of time the future is allowed to
take by wrapping it in a timeout.
Fixes #309
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-07-01 15:08:45 +02:00
Lee Smet
da19bd9977
Update lockfiles with updated dependency
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-07-01 11:29:48 +02:00
dependabot[bot]
0427897050
Bump netdev from 0.28.0 to 0.29.0
...
Bumps [netdev](https://github.com/shellrow/netdev ) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/shellrow/netdev/releases )
- [Commits](https://github.com/shellrow/netdev/compare/v0.28.0...v0.29.0 )
---
updated-dependencies:
- dependency-name: netdev
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-01 11:27:31 +02:00
Lee Smet
6cc4b5de93
Add reworked route table to CHANGELOG.md
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:46:06 +02:00
Lee Smet
962c890418
Update comment for increased defealt link cost
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:44:49 +02:00
Lee Smet
3c0f183642
Fix stale comment in router
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:32:30 +02:00
Lee Smet
76c4bc3024
Add missing doc comment on routing table iterator
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
811f020bd4
Add missing struct docs to RoutingTable::iter_mut
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
3e13d184b0
Reduce scope of write access to routing table
...
Since selecting subnets takes write locks for each subnets, make sure we
aren't holding one currently.
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
ad9cf0d867
Fix transmute type in routing_table::iter_mut
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
db3379712d
Implement mutable iterator for routing table
...
This solves the previous issue using a read only iterator and attempting
to write updates. Since the iterator keeps a read handle, this causes a
deadlock on the second update.
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
36cd5e5db6
Move RouteEntry to submodule
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
49e397969c
Move RouteKey to submodule
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
34e4a7b5a7
Drop route entry guard before triggered_updates
...
Also drop it in places we didn't do so yet
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
7f337897f5
Drop route entries before triggered update
...
Since the changes are reflected once the guard is dropped, we need to
make sure this happens first
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
04e537d8d4
Actually select routes
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
487ef4c1be
Inline deprecated select_best_route method
...
Since it now just forwards a call to RoutingTable it can be inlined on
th call site.
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
6c2b8e5d5e
Add pubkey and shared secret lookup for routes
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
e35b07b4e0
Fix source table tests
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
0eed34bc57
Save SharedSecret on RouteEntry
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
7ba424a983
Add method to get best route entries for IP
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
537618c0b2
Continue new routing table integration
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
723b5c950b
Add iter method to RoutingTable
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
16b1ae1de8
Start implementing new routing table in router
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
af44fa9c08
Clean up new routing table imports
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
a201b14414
Add method to get selected route entry mutably
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
18b97122a9
Add setter for RouterId on RouteEntry
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
1e468b877c
Implement Index and IndexMut for RouteList
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
dc004acfed
Implement iterator over RouteList
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
09d2eaa2e0
Add method to get selected route from RouteList
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
3d0b518794
Add Dipslay for RouteKey
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
c9ffa72b09
Add getters for RouteKey
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
8cb258aa1b
Replace existing routing table with new one
...
Only in the module tree, still needs integration
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
1ac19e96f1
Continuation of routing table rework
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Lee Smet
c477222dc2
Start new route table implementation
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-28 10:28:58 +02:00
Maxime Van Hees
1cd078f304
Update CHANGELOG.md
...
Signed-off-by: Maxime Van Hees <vanheesm@threefold.tech >
2024-06-20 15:23:46 +02:00
Maxime Van Hees
52a9d2019a
Removed commented code
2024-06-20 15:23:46 +02:00
Maxime Van Hees
35896d779c
Keys only loaded when needed
2024-06-20 15:23:46 +02:00
Maxime Van Hees
f97f9b7ace
No more key file generation when using mycelium binary with command (and thus not as service)
2024-06-20 15:23:46 +02:00
Iwan BK
a0e6560add
feat(mobile): expose peer stats
...
Also add timeout to the send/recv channel.
The mobile API returns `Vec<String>` instead of `Result<T, Error>`
because the current rust bridge method can't support `Result<T,
Error>`.
For it to be supported, we need to change the bridging method, which may
not worth it for now.
2024-06-19 11:27:08 +02:00
Lee Smet
98d8d5325b
Update myceliumd-private curve25519-dalek dep
...
Solves a dependabot security report, though we are not affected by it
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-19 09:27:15 +02:00
dependabot[bot]
0ae6746b52
Bump clap from 4.5.4 to 4.5.7 in /myceliumd-private
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.4 to 4.5.7.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.7 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-19 09:20:11 +02:00
dependabot[bot]
7e48eb1a59
Bump clap from 4.5.4 to 4.5.7 in /myceliumd
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.4 to 4.5.7.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.7 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-19 09:19:48 +02:00
Lee Smet
92e64b494c
Add binaries to dependabot config
...
Signed-off-by: Lee Smet <lee.smet@hotmail.com >
2024-06-19 09:16:23 +02:00
dependabot[bot]
3654da923a
Bump curve25519-dalek from 4.1.2 to 4.1.3 in /myceliumd
...
Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek ) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases )
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/curve25519-4.1.2...curve25519-4.1.3 )
---
updated-dependencies:
- dependency-name: curve25519-dalek
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-19 09:11:35 +02:00
dependabot[bot]
a814a49b3e
Bump curve25519-dalek from 4.1.1 to 4.1.3
...
Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek ) from 4.1.1 to 4.1.3.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases )
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/curve25519-4.1.1...curve25519-4.1.3 )
---
updated-dependencies:
- dependency-name: curve25519-dalek
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-19 09:11:09 +02:00