This may cause a deadlock which we observed sometimes in the routing
integration test in CI as one slot in the BP queue is always needed to
finish processing the Bundle in the BP (that causes `agent_forward` in
this case).
This makes the config agent directly invoke the BP function.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This refactors the Router Task into synchronous functions called by the
BP, preventing the need of circular notifications between them.
The router queue is replaced by new signals in the BP queue.
This additionally removes the global state in the bundle processor.
Closes: #11
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This implements what we have as aap_echo.py tool in an agent that runs
within uD3TN itself. This makes it easier to check availability of uD3TN
also if the runtime environment does not provide a Python implementation.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
ud3tn is available under multiple licenses and we want to reflect this in
our source code. But which license information should appear first and how
can we manage this efficiently in the future? The Linux Kernel uses SPDX
expressions instead of boilerplate sections. This seems to be a great
approach, so we do the same here.
Signed-off-by: Georg Alexander Murzik <georg.murzik@d3tn.com>
Previously, we had a build-time flag for enabling configuration via
bundles received from other nodes. Thus, changing the flag required a
re-build. As we are depending on it also for our integration tests and
it is often handy in further setups, this change makes it a command
line argument "--allow-remote-config".
As the STM32 platform does not support command line arguments, remote
configuration is enabled by default there via config.h.
See also: !13, #32
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This moves handling the CONFIG_AGENT_REMOTE_CONFIGURATION flag from the
header to the respective source file as we do not want the variable to
be present in any file including the config_agent header.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
We already have a CONFIG_AGENT_REMOTE_CONFIGURATION build option to
enable remote configuration via the config_agent. However, setting the
time via management_agent is allowed in any case. This change applies
the same restrictions to setting the system time.
Note: Setting the time is important for STM32 as this device does not
manage the time by itself like a POSIX-based system.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This avoids unsynchronized shared state access between the application agent
and the bundle processor tasks, which could lead to use after free errors.
This commit also removes some unreachable code in the `process_aap_message`
function of `application_agent.c`:
```
// already handled by the previous `aap_message_is_valid` call w/ early return
if (msg.eid == NULL || msg.eid_length == 0) {
// zero-length EID, only de-registering
response.type = AAP_MESSAGE_ACK;
}
```
Signed-off-by: Georg Alexander Murzik <georg.murzik@d3tn.com>
To be protected against unauthorized remote configuration, by default
only configuration bundles with a local source EID are processed by the
config agent. This feature can be disabled by setting
CONFIG_AGENT_REMOTE_CONFIGURATION to true at compile time.
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
This is the initial commit for uD3TN. uD3TN is a fork of uPCN v0.8.0,
which will be developed and maintained in a public Git repository.
For questions concerning the history of and code provided with uPCN,
please get in touch with us via: contact <at> d3tn <dot> com
Signed-off-by: Felix Walter <felix.walter@d3tn.com>