Commit graph

1036 commits

Author SHA1 Message Date
Felix Walter
2acc913a88 python-ud3tn-utils: Update protobuf to 5.27.3
This version should be compatible and available on most current systems.
(A compatible protoc version is needed to (re-)generate the modules.)

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-30 13:36:33 +02:00
Felix Walter
88d72fd8d0 mk, test: Pin version of Python test dependencies
We want to pin all versions, thus, these as well.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-30 13:35:44 +02:00
Felix Walter
576d464921
Merge branch 'feature/associate-flags-with-node-in-fib'
See !189
2024-08-29 13:52:17 +02:00
Felix Walter
5a7e198e28
Merge branch 'hotfix/linked-bpv7-rfc'
See !191
2024-08-29 13:51:02 +02:00
Felix Walter
69ea89474d BP: Do not drop all nodes in FIB if no concrete CLA address is present
Sometimes we use CLA addresses such as "smtcp:" or "tcpclv3:", without
an actual next-hop address on the CL. In this case, we do not drop all
FIB entries referencing the "generic" CLA link if a FIB request for
deleting an entry is received.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-23 11:59:18 +02:00
Felix Walter
fe01fd538e python: aap2-bdm-ud3tn-routing: Adapt to AAP2 and FIB changes
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-23 11:59:18 +02:00
Felix Walter
89550209a0 python: aap2-configure-link: Adapt to AAP2 and FIB changes
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-23 11:59:18 +02:00
Felix Walter
21dd896d6f python: aap2: Add function to get the ResponseStatus as string
It is often required to print a proper error message if an unexpected
ResponseStatus is received from µD3TN. Because ResponseStatus is an enum
generated by Protobuf, there seems to be no easy-to-use `name` property.
Thus, we provide a function for mapping the integer values to a readable
string representation in the AAP2Client class.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-23 11:59:18 +02:00
Felix Walter
78bef1a089 Refactor FIB: Separate node entry from CLA link
The FIB fulfils two purposes: 1) map node IDs to next-hop CLA addresses
and 2) store the current status of a link associated with a given CLA
address.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-23 11:59:02 +02:00
Maximilian Nitsch
30b51a64c1 README: Adjust linked BPv7 specification document
μD3TN fully implements RFC 9171, not just draft version 31.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-08-12 13:18:16 +02:00
Felix Walter
72a495dd19
Merge branch 'feature/improve-aap-aap2-usability'
See !188
2024-08-09 15:03:11 +02:00
Felix Walter
459e1b60ff python: aap: Make behavior of AAP (v1) tools consistent with AAPv2
This adapts the v1 tools to the recent changes in the AAPv2 tools so
they use the same return codes and (error) messages.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-09 15:02:19 +02:00
Felix Walter
36a1f8bfc9 python: aap2: Properly handle communication errors when receiving
We are using exceptions for signaling users of the AAP2Client that
communication with µD3TN failed when receiving data, however, we did not
differentiate between normal connection closure and abnormal conditions.
This adds a `AAP2ServerDisconnected` exception to signal that µD3TN has
closed the connection. The supplied tools are adapted to properly handle
both this new exception and other usual cases for termination such as
keyboard interrupts, so that no unnecessary stack traces are printed.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-09 15:02:19 +02:00
Felix Walter
00e4602dbd aap2, agent_manager: Do not warn on double de-registration
If an agent finds out it has a broken connection (the client
disconnected) on a liveliness check (e.g., if another client wants to
register the same agent ID), the agent manager will de-register it, as
it needs to register the new agent immediately and there is a race
condition otherwise. In this case, a warning was shown that should
however only be a debug information.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-09 15:01:46 +02:00
Felix Walter
6775fd8782 aap1: Set admin. config flag on all bundles if no BDM secret set
This makes aap-config / aap_config.py (AAPv1) work again in the default
configuration (debug build, default BDM, no secret set). This way,
pre-existing documentation (YouTube videos, ...) stays usable.

The security properties will not be impacted by this change as AAPv2
clients will be able to do administrative actions anyways if no secret
is set.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-09 15:01:46 +02:00
Felix Walter
a34a785d39 aap2: Properly differentiate connection closure from Protobuf error
This adds a check for detecting EOF and differentiate such an "error"
from actual Protobuf decoding errors so people do not get confusing
log messages.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-09 15:01:46 +02:00
Felix Walter
ff3b1a6bd1
Merge branch 'update/docker-images'
See !181
2024-08-09 14:59:55 +02:00
Felix Walter
a007606fac
Merge branch 'hotfix/nix-package-name-and-version'
See !187
2024-08-09 14:58:06 +02:00
Felix Walter
6a230709ce test/ion_interoperability: Adapt BIBE test for ION changes
There have been recent changes in ION's BIBE implementation [1], which
necessitate adapting the configuration files. As a result, they do not
work with IONe anymore, which uses the old syntax. Thus, we will only
support BIBE interoperability with ION mainline and remove the
corresponding test. Nevertheless, some comments have been added to make
it work with IONe.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-24 17:59:11 +02:00
Maximilian Nitsch
e51d4ab992 test/dockerfiles: Update docker images
- ION:  4.0.1 => 4.1.3
- IONe: 1.0.1 => 1.1.0
- HDTN: 1.0.0 => 1.3.1
- DTN7: 0.19.0-732d1a0 => 0.21.0

For ION-DTN>=4.1.1 the official distribution site has moved to
GitHub[^1].

[^1]: https://github.com/nasa-jpl/ION-DTN
2024-07-24 17:59:10 +02:00
Maximilian Nitsch
966dfcba1d README: Remove nix restriction on x86_64-linux
As support for multiple architectures has been added in 2991a5cf, this
restriction can be removed.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-24 15:36:32 +02:00
Maximilian Nitsch
0bc0f46b30 nix/packages: Fix missing version
The version field was missing for python-ud3tn-utils and pyd3tn
packages.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-24 15:08:36 +02:00
Maximilian Nitsch
2c0e09161b nix/packages: Fix python-ud3tn-utils package name
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-24 13:32:14 +02:00
Felix Walter
d3c48ffec1
Merge branch 'release/v0.14.0-rc1'
See !186
2024-07-17 17:00:22 +02:00
Felix Walter
1b263a124b Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Maximilian Nitsch <maximilian.nitsch@posteo.de>
2024-07-17 14:55:21 +00:00
Maximilian Nitsch
4a15b9362d flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7dca15289a1c2990efbe4680f0923ce14139b042?narHash=sha256-RoxIr/fbndtuKqulGvNCcuzC6KdAib85Q8gXnjzA1dw%3D' (2024-06-30)
  → 'github:NixOS/nixpkgs/53e81e790209e41f0c1efa9ff26ff2fd7ab35e27?narHash=sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs%3D' (2024-07-14)
2024-07-17 11:17:39 +02:00
Felix Walter
53abba28a3 Bump version to v0.14.0-rc1
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-16 22:50:45 +02:00
Felix Walter
cd32c45337 README: Update for v0.14.0 pre-release
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-16 22:50:27 +02:00
Felix Walter
2fffb57dca Update CHANGELOG for v0.14.0 pre-release
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-16 22:50:09 +02:00
Felix Walter
e7cd644873
Merge branch 'hotfix/python-aapv1-tools'
See !185
2024-07-16 17:47:09 +02:00
Felix Walter
62afaffac7 python-ud3tn-utils: Inform that contact plan script can still be used
This extends the message printed by aap_contact_plan_reader.py to
explain that it can still be used if we launch µD3TN with the
--allow-remote-config commandline flag.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 23:42:09 +02:00
Felix Walter
487ae5bf72 python-ud3tn-utils: Remove aap_storage_agent.py
This script is outdated as it does not support the newest approach to
filter bundles and also does not support the authorization required by
the storage agent (the flag is set via AAP 2.0).

aap2_storage_agent.py should be used instead.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 23:39:59 +02:00
Felix Walter
b01d74bb21
Merge branch 'fix/docs'
See !182
2024-07-15 23:01:49 +02:00
Felix Walter
8268a106c9
Merge branch 'feature/builtin-compat-bdm'
See !180
2024-07-15 22:56:49 +02:00
Maximilian Nitsch
40d6ec7b55 doc/sqlite-storage: Move description to the corresponding subsection
After merging !184, the description of how the storage can be accessed
when using the integrated routing agent must be moved to the
corresponding subsection.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-15 14:25:07 +02:00
Maximilian Nitsch
b2dd484b27 Apply 5 suggestion(s) to 4 file(s)
Co-authored-by: Felix Walter <code@felix-walter.eu>
2024-07-15 12:06:09 +00:00
Maximilian Nitsch
2e1ad1ebd5 Merge branch 'update-sqlite-doc' into 'fix/docs'
doc: Extend sqlite CLA docs to capture three options to use it

See merge request d3tn/ud3tn!184
2024-07-15 11:59:15 +00:00
Felix Walter
0081a11731
Merge branch 'update/ci-nix-image'
See !183
2024-07-15 00:48:39 +02:00
Felix Walter
a83098f9fe CLA: Disallow CLA addresses without colon
Allowing both "cla:" and "cla" may lead to issues for single-connection
CLAs (those that do not use CLA-specific addresses): the FIB may contain
entries for both and only one may be marked as "up" if both forms are
used interchangeably.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
281b3ec248 config_parser: Remove unused parser stage
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
ccbeac91f3 Unify and document compile-time options of compat. router
This prefixes all compile-time options of the compat. router with
`ROUTER_` and adds them to config.mk.example so they can be easily
discovered and adapted.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
87be9749af Re-integrate v0.13.0 routing code as "integrated default BDM"
This makes µD3TN behave the same as v0.13.0 when executed without an
additional commandline argument. A new commandline argument `-d` /
`--external-dispatch` is added, which enables the use of external BDMs.
The default forwarding implementation is now again provided using the
v0.13 code, extracted from e1621765a4 and
adapted to the new agent-based forwarding implementation.

Central changes to the old code include:

- A new "Routing Agent" that handles incoming configuration commands,
  FIB updates, and BDM dispatch requests.
- The use of the BDM authorization flag to authorize contact
  configuration commands.
- The Contact Manager now only triggers the creation and removal of
  links / FIB entries; bundle dispatch is triggered through the FIB and
  BDM callback functions of the Routing Agent.
- The fragmentation logic is adapted to store the original bundle along
  with an offset and length value, instead of pre-creating and storing
  the fragments.
- The bundle re-scheduling logic integrated into the Routing Agent is
  simplified and does not support changing the fragmentation parameters.
  A new function is added to the Router that searches for a new route
  for such fragments that were already scheduled at some point,
  considering them as un-fragmentable bundle with overridden fragment
  offset and length.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
ad4f56b62d Re-import v0.13.0 router code
This adds the code from e1621765a4 back
into the tree unchanged, but moved into two new directories, in
preparation of the following commit, which adds a routing agent on this
basis, to make it possible to review the diff properly.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
379ad048e8 bundle_processor: Allow for directly calling FIB and dispatch functions
In agents performing such functions we do not need to add elements to
the queue if we can directly call the corresponding BP function.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
4021d07c27 agent_manager: Remove flexible array member from dispatch_result
It prevents us from declaring the array in a function body without
malloc() and also has a possible risk out-of-bounds accesses when not
used carefully.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
53c1df9252 Harmonize log levels in BP and AM
Everything related to single bundle transmissions only triggers DEBUG log
messages. Non-critical errors trigger warnings. State changes that
potentially affect many transmissions but are part of normal operation
trigger info messages.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
c2fef74ea9 bundle: Allow 64-bit bundle payload lengths
The bundle block length, fragment offset, and total ADU length fields
were using 32-bit uint types, effectively reducing the maximum bundle
payload size to 4 GiB. This changes the field types to 64-bit uint, so
we can support larger bundles.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:10 +02:00
Felix Walter
d480ce3e4c doc: Extend sqlite CLA docs to capture three options to use it
This also fixes the CLA address specified with `aap2-config` - it has to
contain a colon at the end.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-14 23:32:31 +02:00
Maximilian Nitsch
099f40421d doc/sqlite-storage: Use AAP2 instead of AAP commands
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-12 11:02:22 +02:00
Maximilian Nitsch
9367b4b65f doc/posix_quick_start_quide: Use AAP2 instead of AAP commands
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-12 10:33:24 +02:00