nic_router: uncaught exc. on handling link state

An interface that received a signal for a link-state change accessed its
domain reference without assuming that it could not be attached to a domain
at that moment. This caused the NIC router to crash with an uncaught exception
of type 'Net::Pointer<Net::Domain>::Invalid'. The commit adds a catch
directive for this exception resulting in the handler doing nothing if not
attached to any domain.

Fixes #4222
This commit is contained in:
Martin Stein 2021-07-15 12:57:36 +02:00 committed by Christian Helmuth
parent d06773b957
commit 2afae7e7c1

View File

@ -917,6 +917,7 @@ void Interface::handle_interface_link_state()
domain_.discard_ip_config();
}
}
catch (Pointer<Domain>::Invalid) { }
catch (Domain::Ip_config_static) { }
catch (Keep_ip_config) { }