aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/netinet/if_ether.c20
2 files changed, 15 insertions, 7 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 580f9bef9049..3db82bbc60dd 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.4"
-BRANCH="RELEASE-p42"
+BRANCH="RELEASE-p43"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index fd39069760fd..334b1da4a411 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -795,12 +795,20 @@ arplookup(addr, create, proxy)
else if (rt->rt_gateway->sa_family != AF_LINK)
why = "gateway route is not ours";
- if (why && create) {
- log(LOG_DEBUG, "arplookup %s failed: %s\n",
- inet_ntoa(sin.sin_addr), why);
- return 0;
- } else if (why) {
- return 0;
+ if (why) {
+ if (create)
+ log(LOG_DEBUG, "arplookup %s failed: %s\n",
+ inet_ntoa(sin.sin_addr), why);
+
+ /* If there are no references to this route, purge it */
+ if (rt->rt_refcnt <= 0 &&
+ (rt->rt_flags & RTF_WASCLONED) != RTF_WASCLONED) {
+ rtrequest(RTM_DELETE,
+ (struct sockaddr *)rt_key(rt),
+ rt->rt_gateway, rt_mask(rt),
+ rt->rt_flags, 0);
+ }
+ return (0);
}
return ((struct llinfo_arp *)rt->rt_llinfo);
}