diff options
author | csjp <csjp@FreeBSD.org> | 2008-12-06 19:09:38 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2008-12-06 19:09:38 +0000 |
commit | a72e17aca8ca75aa7be4efd0b81d0993fe572313 (patch) | |
tree | 0fdd1bed060ca141539c89b377fdfb653e3a0f3e /sys/netinet | |
parent | 78e3ca984544addee20dc6f608d32e1b19fa0a69 (diff) | |
download | FreeBSD-src-a72e17aca8ca75aa7be4efd0b81d0993fe572313.zip FreeBSD-src-a72e17aca8ca75aa7be4efd0b81d0993fe572313.tar.gz |
in_rtalloc1(9) returns a locked route, so make sure that we use
RTFREE_LOCKED() here. This macro makes sure the reference count
on the route is being managed properly. This elimates another
case which results in the following message being printed to the
console:
rtfree: 0xc841ee88 has 1 refs
Reviewed by: bz
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index cf19a22..da7946d 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -924,12 +924,12 @@ reply: * over who claims what Ether address. */ if (rt->rt_ifp == ifp) { - rtfree(rt); + RTFREE_LOCKED(rt); goto drop; } (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln); - rtfree(rt); + RTFREE_LOCKED(rt); /* * Also check that the node which sent the ARP packet @@ -948,10 +948,10 @@ reply: " from %s via %s, expecting %s\n", inet_ntoa(isaddr), ifp->if_xname, rt->rt_ifp->if_xname); - rtfree(rt); + RTFREE_LOCKED(rt); goto drop; } - rtfree(rt); + RTFREE_LOCKED(rt); #ifdef DEBUG_PROXY printf("arp: proxying for %s\n", |