Index: sys/netinet/if_ether.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v
retrieving revision 1.104
retrieving revision 1.104.2.1
diff -c -p -r1.104 -r1.104.2.1
*** sys/netinet/if_ether.c	4 Mar 2003 23:19:52 -0000	1.104
--- sys/netinet/if_ether.c	23 Sep 2003 20:08:42 -0000	1.104.2.1
*************** arplookup(addr, create, proxy)
*** 918,929 ****
  	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;
  	}
  	return ((struct llinfo_arp *)rt->rt_llinfo);
  }
--- 918,937 ----
  	else if (rt->rt_gateway->sa_family != AF_LINK)
  		why = "gateway route is not ours";
  
! 	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);
  }
