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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>