summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Smith <mgsmith@netgate.com>2015-11-18 10:33:28 -0600
committerMatt Smith <mgsmith@netgate.com>2015-11-18 10:33:28 -0600
commit95113c0a120cf2b18d306dfffee6a4cc085d9909 (patch)
tree324d06d71261e7e51c9123b1940e237de9f69d6c
parent940bd93b66fa74593b95811014df88cf99c71cf7 (diff)
downloadFreeBSD-src-95113c0a120cf2b18d306dfffee6a4cc085d9909.zip
FreeBSD-src-95113c0a120cf2b18d306dfffee6a4cc085d9909.tar.gz
Importing pfSense patch redmine_4685.diff
-rw-r--r--sys/netinet/if_ether.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index baa9c26..b763a2a 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -353,6 +353,7 @@ retry:
if ((la->la_flags & LLE_VALID) &&
((la->la_flags & LLE_STATIC) || la->la_expire > time_uptime)) {
bcopy(&la->ll_addr, desten, ifp->if_addrlen);
+ renew = 0;
/*
* If entry has an expiry time and it is approaching,
* see if we need to send an ARP request within this
@@ -360,13 +361,20 @@ retry:
*/
if (!(la->la_flags & LLE_STATIC) &&
time_uptime + la->la_preempt > la->la_expire) {
- arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL);
+ renew = 1;
la->la_preempt--;
}
*lle = la;
- error = 0;
- goto done;
+
+ if (flags & LLE_EXCLUSIVE)
+ LLE_WUNLOCK(la);
+ else
+ LLE_RUNLOCK(la);
+
+ if (renew == 1)
+ arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL);
+ return (0);
}
if (la->la_flags & LLE_STATIC) { /* should not happen! */
OpenPOWER on IntegriCloud