From 2afae7e7c14ef14584abd9b0626e371fa96b5edb Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 15 Jul 2021 12:57:36 +0200 Subject: [PATCH] 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::Invalid'. The commit adds a catch directive for this exception resulting in the handler doing nothing if not attached to any domain. Fixes #4222 --- repos/os/src/server/nic_router/interface.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/os/src/server/nic_router/interface.cc b/repos/os/src/server/nic_router/interface.cc index f9907b03ed..8a42059ed9 100644 --- a/repos/os/src/server/nic_router/interface.cc +++ b/repos/os/src/server/nic_router/interface.cc @@ -917,6 +917,7 @@ void Interface::handle_interface_link_state() domain_.discard_ip_config(); } } + catch (Pointer::Invalid) { } catch (Domain::Ip_config_static) { } catch (Keep_ip_config) { }