nic_router: fix uncaught Domain_tree::No_match

When having an interface that yet is not attached to a domain, then a new
configuration comes in and the interface receives a domain name (via the
policy tag) but the corresponding domain doesn't exist, an exception
Domain_tree::No_match is thrown but was not caught and handled until now.

Issue #2670
This commit is contained in:
Martin Stein 2018-04-03 13:26:56 +02:00 committed by Christian Helmuth
parent 54b10b1b38
commit 87eb23f562

View File

@ -1591,8 +1591,9 @@ void Interface::handle_config(Configuration &config)
}
catch (Pointer<Domain>::Invalid) {
/* the interface had no domain but now it gets one */
_attach_to_domain(new_domain_name, false);
/* the interface had no domain but now it may get one */
try { _attach_to_domain(new_domain_name, false); }
catch (Domain_tree::No_match) { }
}
}