nic_router: do not warn on sending to empty domain

The warning "no interface connected to domain" was introduced when only one NIC
session at a time could be connected to a domain. It should help to track
packet drops that were caused by startup timing issues between servers and
clients. However, a user should watch the "NIC sessions" value of a domain
(verbose_domain_state) instead when debugging packet loss. With support for
multiple sessions per domain, even a non-empty domain may still miss the
session that connects the desired server.

Fix #2629
This commit is contained in:
Martin Stein 2017-12-19 18:21:45 +01:00 committed by Christian Helmuth
parent 36104098ad
commit 226c4a475b
2 changed files with 2 additions and 12 deletions

View File

@ -922,9 +922,6 @@ void Interface::_handle_eth(void *const eth_base,
catch (Domain::No_next_hop) {
error("can not find next hop"); }
catch (List<Interface>::Empty) {
error("no interface connected to domain"); }
catch (Alloc_dhcp_msg_buffer_failed) {
error("failed to allocate buffer for DHCP reply"); }

View File

@ -24,18 +24,11 @@ namespace Net {
template <typename LT>
struct Net::List : Genode::List<LT>
{
using Base = Genode::List<LT>;
struct Empty : Genode::Exception { };
template <typename FUNC>
void for_each(FUNC && functor)
{
if (!Base::first()) {
throw Empty();
}
for (LT * elem = Base::first(); elem;
elem = elem->Base::Element::next())
for (LT * elem = Genode::List<LT>::first(); elem;
elem = elem->Genode::List<LT>::Element::next())
{
functor(*elem);
}