Commit Graph
739 Commits
Author SHA1 Message Date
Lee Smet 6ecb37628f Close #174: Reduce size field in datapacket header
Reduce the size from 19 to 16 bits

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-26 11:48:36 +01:00
dependabot[bot] d9e3020e0b Bump bytes from 1.5.0 to 1.6.0
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 11:20:59 +01:00
dependabot[bot] 2dee0dba4b Bump network-interface from 1.1.1 to 1.1.2
Bumps [network-interface](https://github.com/EstebanBorai/network-interface) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/EstebanBorai/network-interface/releases)
- [Changelog](https://github.com/EstebanBorai/network-interface/blob/main/CHANGELOG.md)
- [Commits](https://github.com/EstebanBorai/network-interface/compare/v1.1.1...v1.1.2)

---
updated-dependencies:
- dependency-name: network-interface
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 11:05:01 +01:00
dependabot[bot] acf2f2436f Bump base64 from 0.21.7 to 0.22.0
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.7 to 0.22.0.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.21.7...v0.22.0)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 11:03:46 +01:00
dependabot[bot] 3ba2d1ac53 Bump blake3 from 1.5.0 to 1.5.1
Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/1.5.0...1.5.1)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 11:03:28 +01:00
dependabot[bot] 0f5f6f9cd0 Bump clap from 4.5.3 to 4.5.4
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.3 to 4.5.4.
- [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/v4.5.3...v4.5.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 11:01:30 +01:00
Lee Smet 3922d522e7 Add source key fixes to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-25 14:56:38 +01:00
Lee Smet a6fd2563d1 Properly reset source key gc timers
After fixing #176 the source key garbage collection timers are not
updated if the source key is not adjusted. As a a result, in stable
networks source keys get garbage collected too frequently. Now we
properly reset them.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-25 14:52:52 +01:00
Lee Smet 515f0470e8 Update source table only on seqno increase
The previous condition updated the source table unconditionally if the
new seqno was not less than the existing source key seqno. This is not
correct however, as it also updates the source key if the seqno is
the same, thus allowing the source key metric to increase for the same
seqno. This allows for loops to be created, as an update could increase
the metric, after which a loop update could eronously be accepted.

Fixes #176

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-25 14:02:36 +01:00
Lee Smet 4a3f4cf2cb Bump version to v0.4.4
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-22 15:15:57 +01:00
Lee Smet 82caffeaca Set truncate when creating a new key file
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-22 15:13:11 +01:00
Lee Smet ac5c48a052 Use dedicated .cloned() method to clone message
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-22 15:12:00 +01:00
Lee Smet edcdde5d0e Rework Router::trigger_update to become method
Previously this was an associated function on the Router, now we use it
as method. This also means we don't have to pass in the SourceTable
anymore.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-22 14:47:21 +01:00
Lee Smet 647344f03f Update source table before sending updates
Because of the concurrency primitive used we previously batched update
effects on the source table and applied them once all updates were
processed. This means updates could already be in the process of being
sent, and in case of low latency links, they might even have been
processed already. This could lead to a routing loop because the source
table might not reject the loop update coming back (if it wasn't updated
properly yet).

Fixes #170

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-22 14:47:21 +01:00
dependabot[bot] f5f36c6d12 Bump faster-hex from 0.8.1 to 0.9.0
Bumps [faster-hex](https://github.com/NervosFoundation/faster-hex) from 0.8.1 to 0.9.0.
- [Changelog](https://github.com/nervosnetwork/faster-hex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NervosFoundation/faster-hex/commits/v0.9.0)

---
updated-dependencies:
- dependency-name: faster-hex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 10:14:31 +01:00
dependabot[bot] 43d0c58f1c Bump rtnetlink from 0.13.1 to 0.14.1
Bumps [rtnetlink](https://github.com/rust-netlink/rtnetlink) from 0.13.1 to 0.14.1.
- [Release notes](https://github.com/rust-netlink/rtnetlink/releases)
- [Changelog](https://github.com/rust-netlink/rtnetlink/blob/main/CHANGELOG)
- [Commits](https://github.com/rust-netlink/rtnetlink/compare/v0.13.1...v0.14.1)

---
updated-dependencies:
- dependency-name: rtnetlink
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 10:13:52 +01:00
dependabot[bot] 76142e7554 Bump toml from 0.8.10 to 0.8.12
Bumps [toml](https://github.com/toml-rs/toml) from 0.8.10 to 0.8.12.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.12)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 18:03:20 +01:00
dependabot[bot] c4d3c91544 Bump clap from 4.4.18 to 4.5.3
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.18 to 4.5.3.
- [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/v4.4.18...v4.5.3)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 18:03:03 +01:00
dependabot[bot] cd927aef08 Bump tokio-stream from 0.1.14 to 0.1.15
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.14 to 0.1.15.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.14...tokio-stream-0.1.15)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 17:57:05 +01:00
Lee Smet f113c0b1e9 Ignore AddrAlreadyInUse errors when joining LL mc
When joining the link local multicast group used for local peer
discovery, there is apparently a condition where the multicast group is
joined but the code is not aware of this (it tries again on the next
iteration). Future calls for this interface will return an
AddrAlreadyInUse error, which we now consider to indicate the interface
is already part of the group, so it is ignored on future calls.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-19 10:16:55 +01:00
Lee Smet e69aecceef Load peer counters from peer manager
Don't load the counters from the peer itself, since they are now also
tracked on the peer manager. Additionally, this means we don't have to
save them on the peer itself anymore.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-15 15:17:51 +01:00
Lee Smet d75353b4b4 Keep track of peer traffic across reconnects
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-15 14:55:24 +01:00
Lee Smet 31712121fa Bump version to v0.4.3
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-15 10:55:58 +01:00
Lee Smet 19207e5fba Close #146: Add option to silence most logs
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-13 20:28:28 +01:00
Lee Smet adfaa4d5f6 Set release_max_level_debug feature on crate
Since we don't provide a flag to see trace logs, release builds (which
are shipped) won't be able to see these anyway. So it doesn't really
make sense to keep them around in the binary.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-13 16:10:16 +01:00
Lee Smet 0ef256703d Add a note on rustls in Cargo.toml
Specifically note that the dangerous_configuration feature is enabled
because we need it for quinn and the dummy TLS certificates.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-12 18:37:40 +01:00
Lee Smet a4bb770f7b Remove reqwest tls features
Also enable rustls dangerous_configuration feature. This was previously
transitively enabled by the reqwest features.

As a result of this change the CLI won't be able to connect with a
remote endpoint anymore, although it actually couldn't do this in the
first place. It also is a bad idea to expose the API, so not allowing
users to connect with it through the API is fine.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-12 17:57:49 +01:00
Lee Smet 7c59b82694 Close #136: Periodically register new mc ifaces
Previously link local discovery grabbed the IPv6 enabled interfaces at
startup, but did not register new interfaces later. We now also update
the interfaces before sending a beacon, so an interface added while
running will receive incoming discovery beacons (provided the interface
has IPv6 enabled).

This commit also changes the behavior when no IPv6 enabled interfaces
are found. Previously we considered this an error and terminated link
local discovery outright. Now we simply warn the user and continue as
usual, trying again to add interfaces every interval.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-12 17:21:42 +01:00
dependabot[bot] 44d51b27fe Bump rcgen from 0.12.0 to 0.12.1
Bumps [rcgen](https://github.com/rustls/rcgen) from 0.12.0 to 0.12.1.
- [Commits](https://github.com/rustls/rcgen/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: rcgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 11:30:21 +01:00
dependabot[bot] 2df2b21e8e Bump log from 0.4.20 to 0.4.21
Bumps [log](https://github.com/rust-lang/log) from 0.4.20 to 0.4.21.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.20...0.4.21)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 11:30:02 +01:00
dependabot[bot] d03773ce1f Bump x25519-dalek from 2.0.0 to 2.0.1
Bumps [x25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/2.0.0...x25519-2.0.1)

---
updated-dependencies:
- dependency-name: x25519-dalek
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 11:29:50 +01:00
dependabot[bot] 89ad7a1613 Bump nix from 0.27.1 to 0.28.0
Bumps [nix](https://github.com/nix-rust/nix) from 0.27.1 to 0.28.0.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.27.1...v0.28.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 11:20:31 +01:00
dependabot[bot] b9795454d9 Bump libc from 0.2.152 to 0.2.153
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.152 to 0.2.153.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.152...0.2.153)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 11:06:36 +01:00
Lee Smet dbe9d6e28f Add proper error handling for OOB ICMP packets
These packets previously were assumed to be correctly formed. Because of
this, if a node (intentionally) send a malformed packet, the receiver
could have a panic on the packet extraction loop, which in turn means no
packets could be received until the process restarted.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-11 14:12:03 +01:00
Lee Smet b6a2aefc2f Update etherparse dependency to v0.14.2
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-11 14:01:00 +01:00
Lee Smet 2126982291 Update axum dependency to v0.7.4
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-08 18:34:57 +01:00
Lee Smet c8c918234e Close #153: Feature gate http API
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-08 18:09:33 +01:00
dependabot[bot] b7961a0568 Bump toml from 0.7.8 to 0.8.10
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.8 to 0.8.10.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.8...toml-v0.8.10)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 16:50:58 +01:00
dependabot[bot] 8f5a7f692d Bump serde from 1.0.195 to 1.0.197
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.195 to 1.0.197.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.195...v1.0.197)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 16:41:51 +01:00
dependabot[bot] 9d209d0bfb Bump serde_json from 1.0.111 to 1.0.114
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.111 to 1.0.114.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.111...v1.0.114)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 16:05:44 +01:00
Lee Smet 738ceab4ea Create dependabot.yml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-03-06 19:28:04 +01:00
dependabot[bot] 14ef7e0889 Bump mio from 0.8.10 to 0.8.11
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 15:29:50 +01:00
Lee Smet db47b26293 Document new hosted public peers
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-29 16:29:37 +01:00
Lee Smet ad95648065 Change log lvl when joining LL mc group fails
Error -> warning. Also log the interface index which failed. Warning is
sufficient here since we continue to check other interfaces as well.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-29 16:02:39 +01:00
Lee Smet 74c9c2d063 Feature gate messages
Sets up a feature for "message", which enables message related code. The
current implementation is probably not the cleanest, but it gets the job
done. The default feature is set to include the message feature, so
regular builds will not change. But in case it would be useful, the
message code can be removed statically from the binary by building with
--no-default-features.

Closes #130

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 15:50:33 +01:00
Lee Smet 22cb2c939c Move message API handlers to dedicated module
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 14:40:39 +01:00
Lee Smet c4bb07226d Don't use args for new rustfmt action
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 13:17:07 +01:00
Lee Smet fcb3acc729 Rework CI to separate jobs
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 13:12:00 +01:00
Lee Smet e78bdfa9fd Install rustfmt action when installing rust in CI
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:50:38 +01:00
Lee Smet 3fa5b8a55c Put args in the proper place in CI action
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:34:52 +01:00