On 16.03.2018 14:47, sth...@nethelp.no wrote:
>> And thank you for that suggestion! The packet loss during ARP refresh
>> (of the destination address connected to the output interface) does
>> *not* happen when the box is forwarding! It only happens with locally
>> generated traffic.
> 
> Checking once per second with "arp -n <destination IP>" I can see the
> following behavior with net.link.ether.inet.max_age=120:
> 
> - Locally generated traffic: The ARP entry is refreshed after
> net.link.ether.inet.max_age seconds - which presumably means it
> actually expires first. And there is some packet loss.
> 
> - Transit traffic (the box is forwarding): The ARP entry is refreshed
> 5 seconds *before* net.link.ether.inet.max_age has passed, and there
> is no packet loss.
Can you test this patch? I did not tested it, but I think it should fix
this issue.

-- 
WBR, Andrey V. Elsukov
Index: sys/net/if_ethersubr.c
===================================================================
--- sys/net/if_ethersubr.c	(revision 330791)
+++ sys/net/if_ethersubr.c	(working copy)
@@ -317,6 +317,17 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
 				phdr = lle->r_linkdata;
 				hlen = lle->r_hdrlen;
 				pflags = lle->r_flags;
+				/*
+				 * XXX: Check if we have feedback request
+				 *      from arptimer()/nd6_llinfo_timer().
+				 */
+				if ((pflags & RLLE_VALID) &&
+				    lle->r_skip_req != 0) {
+					LLE_REQ_LOCK(lle);
+					/* Notify that entry was used */
+					lle->r_skip_req = 0;
+					LLE_REQ_UNLOCK(lle);
+				}
 			}
 		}
 	}

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to