aurae-runtime / auraed

Secure mTLS and gRPC backed runtime daemon. Alternative to systemd. Written in Rust.
https://aurae.io/auraed
Apache License 2.0
60 stars 11 forks source link

Waiting for network link to become available #40

Open Vincinator opened 1 year ago

Vincinator commented 1 year ago

When setting a network device up (via netlink) the function returns before the network device is actually in state up. Assigning routes to a network device (via netlink) requires the network device to be up.

I think the caller should safely assume that .await for the async function init/network.rs:set_link_up assures that the link is up, so that follow up network configuration steps can safely assume that the link is really up after the call.

In addition, I would like to provide access to the netdevice state during network configuration, so that a config functions relying on a link state can implement safety checks.