nic_router: do not route to domains w/o IP config

Ref #2534
This commit is contained in:
Martin Stein 2017-12-04 18:31:05 +01:00 committed by Christian Helmuth
parent fb2398dbf2
commit b8d8bc3142
1 changed files with 3 additions and 0 deletions

View File

@ -272,6 +272,9 @@ void Interface::_adapt_eth(Ethernet_frame &eth,
Packet_descriptor const &pkt,
Interface &interface)
{
if (!interface.domain().ip_config().valid) {
throw Packet_ignored("target domain has yet no IP config");
}
Ipv4_address const &hop_ip = interface._domain.next_hop(ip);
try { eth.dst(interface._arp_cache.find_by_ip(hop_ip).mac()); }
catch (Arp_cache::No_match) {