nic_router: bad-protocol message only if verbose

This was an error output-line for each affected packet previously but it
is pretty normal for the router to receive packets whose network layer
protocol it doesn't know . In the default case, these packets shall be
ignored silently.

Ref #2490
This commit is contained in:
Martin Stein 2017-09-29 12:08:40 +02:00 committed by Christian Helmuth
parent 30a96706cb
commit 5f65791962
1 changed files with 4 additions and 2 deletions

View File

@ -847,8 +847,10 @@ void Interface::_handle_eth(void *const eth_base,
error("invalid ethernet frame"); }
catch (Interface::Bad_network_protocol) {
error("unknown network layer protocol"); }
if (_config().verbose()) {
log("unknown network layer protocol");
}
}
catch (Ipv4_packet::No_ip_packet) {
error("invalid IP packet"); }