NIC router: descriptive error on missing interface

Previously, if a packet should be routed to a domain that had no interface
connected, the NIC router only printed "Unroutable packet". Technically,
this was wrong as an unavailable interface doesn't mean that the routing
failed. Now it gives an error "no interface connected to domain".

Ref #2193
This commit is contained in:
Martin Stein 2016-12-06 12:51:58 +01:00 committed by Norman Feske
parent 524f330218
commit 27cc0a402a

View File

@ -350,7 +350,6 @@ void Interface::_handle_ip(Ethernet_frame &eth,
return;
}
catch (Forward_rule_tree::No_match) { }
catch (Pointer<Interface>::Invalid) { }
}
/* try to route via transport and permit rules */
try {
@ -372,7 +371,6 @@ void Interface::_handle_ip(Ethernet_frame &eth,
}
catch (Transport_rule_list::No_match) { }
catch (Permit_single_rule_tree::No_match) { }
catch (Pointer<Interface>::Invalid) { }
/* try to route via IP rules */
try {
@ -388,7 +386,6 @@ void Interface::_handle_ip(Ethernet_frame &eth,
return;
}
catch (Ip_rule_list::No_match) { }
catch (Pointer<Interface>::Invalid) { }
/* give up and drop packet */
if (_config().verbose()) {
@ -550,6 +547,9 @@ void Interface::_handle_eth(void *const eth_base,
catch (Domain::No_next_hop) {
error("can not find next hop"); }
catch (Pointer<Interface>::Invalid) {
error("no interface connected to domain"); }
}