nic_router: packet verbose at detached interfaces

The 'verbose packets' output previously was not generated for Interfaces
without a domain. But this is desirable as the router nonetheless
receives packets at such interfaces. This is now fixed and such output
is simply prefixed with a "[?]" denoting that the interface has no
domain.

Issue #2732
This commit is contained in:
Martin Stein 2018-03-26 18:32:34 +02:00 committed by Christian Helmuth
parent 98617432c3
commit 9b936dd120

View File

@ -1142,8 +1142,13 @@ void Interface::_handle_eth(void *const eth_base,
error("failed to allocate IP for DHCP client"); }
}
catch (Pointer<Domain>::Invalid) {
if (_config().verbose_packets()) {
Ethernet_frame *const eth = reinterpret_cast<Ethernet_frame *>(eth_base);
log("[?] rcv ", *eth);
}
if (_config().verbose()) {
log("(?) Drop packet: no domain");
log("[?] Drop packet: no domain");
}
}
}