mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 12:06:00 +00:00
nic_router: prevent ARP request without ARP waiter
The router used to send an ARP request for a packet before allocating the corresponding ARP waiter. If the ARP waiter could not be allocated due to resource exhaustion plus emergency free failed, the packet got dropped and the router had produced unnecessary network traffic. The commit fixes this by sending only after successful allocation. Ref #4534
This commit is contained in:
parent
682dedb2e1
commit
31a438edf6
@ -605,14 +605,14 @@ Packet_result Interface::_adapt_eth(Ethernet_frame ð,
|
||||
},
|
||||
[&] /* handle_no_match */ ()
|
||||
{
|
||||
remote_domain.interfaces().for_each([&] (Interface &interface)
|
||||
{
|
||||
interface._broadcast_arp_request(
|
||||
remote_ip_cfg.interface().address, hop_ip);
|
||||
});
|
||||
retry_once<Out_of_ram, Out_of_caps>(
|
||||
[&] {
|
||||
new (_alloc) Arp_waiter { *this, remote_domain, hop_ip, pkt, _config_ptr->arp_request_timeout(), _timer };
|
||||
remote_domain.interfaces().for_each([&] (Interface &interface)
|
||||
{
|
||||
interface._broadcast_arp_request(
|
||||
remote_ip_cfg.interface().address, hop_ip);
|
||||
});
|
||||
result = packet_postponed();
|
||||
},
|
||||
[&] { _try_emergency_free_quota(); },
|
||||
|
Loading…
x
Reference in New Issue
Block a user