Fix a logic error in the check to see if arplookup() should free the route.

Noticed by:	Mike Hogsett
Reviewed by:	ru
This commit is contained in:
bms 2003-09-24 20:52:25 +00:00
parent 0b9dcf3092
commit c4d2292202

View File

@ -924,8 +924,7 @@ arplookup(addr, create, proxy)
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) {
if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_WASCLONED)) {
rtrequest(RTM_DELETE,
(struct sockaddr *)rt_key(rt),
rt->rt_gateway, rt_mask(rt),