From: Roy Marples Date: Mon, 9 Sep 2019 16:20:29 +0000 (+0100) Subject: inet: Don't mark cloned route as RTF_REJECT on RTM_MISS X-Git-Tag: v5.8.0rc1~1006 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/25966042bdf034a8d395abae7b7d357f35c90cea inet: Don't mark cloned route as RTF_REJECT on RTM_MISS With the current behaviour, the cloned route is marked as RTF_REJECT which means subsequent use is delayed until either an ARP reply comes in or the ARP entry times out and resolution can then begin again. Instead, no longer mark the route for RTF_REJECT and allow more ARP requests to go out if something really wants to use it. This mirror the current behaviour for inet6. --- diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 98815001a7..f927bde80e 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -587,15 +587,12 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, rt->rt_flags &= ~RTF_REJECT; if (la->la_asked == 0 || rt->rt_expire != time_uptime) { rt->rt_expire = time_uptime; - if (la->la_asked++ < arp_maxtries) { - arprequest(ifp, - &SIN(rt->rt_ifa->ifa_addr)->sin_addr, - &SIN(dst)->sin_addr, - NULL); - } else { - rt->rt_flags |= RTF_REJECT; + arprequest(ifp, + &SIN(rt->rt_ifa->ifa_addr)->sin_addr, + &SIN(dst)->sin_addr, + NULL); + if (la->la_asked++ >= arp_maxtries) { rt->rt_expire += arpt_down; - la->la_asked = 0; la->la_preempt = arp_maxtries; rt_rtmsg(RTM_MISS, rt, rt->rt_ifp, 0); }