diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-25 16:43:23 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-25 16:43:23 +0000 |
commit | c5b5c5d184110417fa647c8da369d23213902d97 (patch) | |
tree | baa6668afeb9ec283dfaf58834647927c1ac353c /sys/netinet | |
parent | 06e78610d84cae10b45ee760042ae34137ad6944 (diff) |
Change the "can't allocate llinfo" to a better log message that includes
the problemantic IP address and a hopefully better reason message.
After discussion with dtucker@, "fine with me" deraadt@ some time ago
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index cf9c1662d81..faebe8516f3 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.67 2007/03/18 23:23:17 mpf Exp $ */ +/* $OpenBSD: if_ether.c,v 1.68 2007/03/25 16:43:22 claudio Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -385,14 +385,20 @@ arpresolve(ac, rt, m, dst, desten) ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, desten); return (1); } - if (rt) + if (rt) { la = (struct llinfo_arp *)rt->rt_llinfo; - else { + if (la == NULL) + log(LOG_DEBUG, "arpresolve: %s: route without link " + "local address\n", inet_ntoa(SIN(dst)->sin_addr)); + } else { if ((la = arplookup(SIN(dst)->sin_addr.s_addr, 1, 0)) != NULL) rt = la->la_rt; + else + log(LOG_DEBUG, + "arpresolve: %s: can't allocate llinfo\n", + inet_ntoa(SIN(dst)->sin_addr)); } if (la == 0 || rt == 0) { - log(LOG_DEBUG, "arpresolve: can't allocate llinfo\n"); m_freem(m); return (0); } |