diff --git a/repos/os/src/server/nic_router/README b/repos/os/src/server/nic_router/README index 3f37f74e38..fd28c047ef 100644 --- a/repos/os/src/server/nic_router/README +++ b/repos/os/src/server/nic_router/README @@ -720,10 +720,10 @@ information on that, refer to [Behavior regarding the NIC-session link state]. 'link_state_triggers' -A boolean value that controls whether to enforce sending a report each time the -state that is controlled through the 'link_state' attribute of the tag -changes. I.e., whenever the real link state of any interface at the router has -changed. +A boolean value that controls whether to enforce sending a report whenever the +real link state (see description of the 'link_state' attribute) of any +interface at the router has changed. Note that whenever an interface is created +or destroyed this is considered a change of its real link state. 'interval_sec' diff --git a/repos/os/src/server/nic_router/interface.cc b/repos/os/src/server/nic_router/interface.cc index 25b74247af..8d0958fddd 100644 --- a/repos/os/src/server/nic_router/interface.cc +++ b/repos/os/src/server/nic_router/interface.cc @@ -1923,6 +1923,8 @@ Interface::Interface(Genode::Entrypoint &ep, _interfaces { interfaces } { _interfaces.insert(this); + try { _config().report().handle_interface_link_state(); } + catch (Pointer::Invalid) { } } @@ -2375,6 +2377,8 @@ void Interface::cancel_arp_waiting(Arp_waiter &waiter) Interface::~Interface() { + try { _config().report().handle_interface_link_state(); } + catch (Pointer::Invalid) { } _detach_from_domain(); _interfaces.remove(this); } diff --git a/repos/os/src/server/nic_router/uplink_session_root.cc b/repos/os/src/server/nic_router/uplink_session_root.cc index a0f4f75085..28ee10e798 100644 --- a/repos/os/src/server/nic_router/uplink_session_root.cc +++ b/repos/os/src/server/nic_router/uplink_session_root.cc @@ -106,8 +106,8 @@ Net::Uplink_session_component::Uplink_session_component(Session_env _rx.sigh_ack_avail (_interface.pkt_stream_signal_handler()); /* - * We do not install ready_to_submit because submission is only triggered by - * incoming packets (and dropped if the submit queue is full). + * We do not install ready_to_submit because submission is only triggered + * by incoming packets (and dropped if the submit queue is full). * The ack queue should never be full otherwise we'll be leaking packets. */ }