diff --git a/repos/os/src/server/nic_router/dhcp_client.cc b/repos/os/src/server/nic_router/dhcp_client.cc index 6c2b9a9885..a3bc0735cb 100644 --- a/repos/os/src/server/nic_router/dhcp_client.cc +++ b/repos/os/src/server/nic_router/dhcp_client.cc @@ -53,11 +53,10 @@ Configuration &Dhcp_client::_config() { return _domain().config(); }; Domain &Dhcp_client::_domain() { return _interface.domain(); } -Dhcp_client::Dhcp_client(Genode::Allocator &alloc, - Timer::Connection &timer, +Dhcp_client::Dhcp_client(Timer::Connection &timer, Interface &interface) : - _alloc(alloc), _interface(interface), + _interface(interface), _timeout(timer, *this, &Dhcp_client::_handle_timeout) { } diff --git a/repos/os/src/server/nic_router/dhcp_client.h b/repos/os/src/server/nic_router/dhcp_client.h index 306faafad9..f56e5e5ad4 100644 --- a/repos/os/src/server/nic_router/dhcp_client.h +++ b/repos/os/src/server/nic_router/dhcp_client.h @@ -16,7 +16,6 @@ /* Genode includes */ #include -#include #include namespace Net { @@ -37,7 +36,6 @@ class Net::Dhcp_client INIT = 0, SELECT = 1, REQUEST = 2, BOUND = 3, RENEW = 4, REBIND = 5 }; - Genode::Allocator &_alloc; Interface &_interface; State _state { State::INIT }; Timer::One_shot_timeout _timeout; @@ -62,8 +60,7 @@ class Net::Dhcp_client public: - Dhcp_client(Genode::Allocator &alloc, - Timer::Connection &timer, + Dhcp_client(Timer::Connection &timer, Interface &interface); void handle_dhcp_reply(Dhcp_packet &dhcp); diff --git a/repos/os/src/server/nic_router/interface.cc b/repos/os/src/server/nic_router/interface.cc index 84e04f4c50..b5969e1cc5 100644 --- a/repos/os/src/server/nic_router/interface.cc +++ b/repos/os/src/server/nic_router/interface.cc @@ -377,7 +377,7 @@ void Interface::attach_to_domain() /* construct DHCP client if the new domain needs it */ if (domain.ip_config_dynamic()) { - _dhcp_client.construct(_alloc, _timer, *this); + _dhcp_client.construct(_timer, *this); } attach_to_domain_finish(); } @@ -2020,7 +2020,7 @@ void Interface::handle_config_2() _dhcp_client.destruct(); } if (new_domain.ip_config_dynamic()) { - _dhcp_client.construct(_alloc, _timer, *this); + _dhcp_client.construct(_timer, *this); } return; } @@ -2035,7 +2035,7 @@ void Interface::handle_config_2() if (!old_domain.ip_config_dynamic() && new_domain.ip_config_dynamic()) { - _dhcp_client.construct(_alloc, _timer, *this); + _dhcp_client.construct(_timer, *this); } /* remember that the interface stays attached to the same domain */ @@ -2062,7 +2062,7 @@ void Interface::handle_config_2() /* construct DHCP client if the new domain needs it */ if (new_domain.ip_config_dynamic()) { - _dhcp_client.construct(_alloc, _timer, *this); + _dhcp_client.construct(_timer, *this); } } catch (Domain_tree::No_match) { }