nic_router: cancel remote ARP on new IP config

When a domain is updated to a new component config, the two criteria for
keeping an ARP waiting state of a remote domain are whether the remote
domain still exists and whether its IP config is still the same. This
means that a domain must also dissolve all of its remote ARP waiting
states if its IP config changes (without an update of the component
config). This wasn't the case until now.

Issue #2840
This commit is contained in:
Martin Stein 2018-06-15 13:08:47 +02:00 committed by Norman Feske
parent 9b619e95b2
commit 055862c0eb

View File

@ -80,6 +80,11 @@ void Domain::ip_config(Ipv4_config const &new_ip_config)
interface.detach_from_remote_ip_config();
});
});
/* dissolve foreign ARP waiters */
while (_foreign_arp_waiters.first()) {
Arp_waiter &waiter = *_foreign_arp_waiters.first()->object();
waiter.src().cancel_arp_waiting(waiter);
}
}
/* overwrite old with new IP config */
_ip_config.construct(new_ip_config);
@ -229,16 +234,6 @@ Domain::~Domain()
}
void Domain::__FIXME__dissolve_foreign_arp_waiters()
{
/* let other interfaces destroy their ARP waiters that wait for us */
while (_foreign_arp_waiters.first()) {
Arp_waiter &waiter = *_foreign_arp_waiters.first()->object();
waiter.src().cancel_arp_waiting(waiter);
}
}
Dhcp_server &Domain::dhcp_server()
{
Dhcp_server &dhcp_server = _dhcp_server();