diff --git a/sys/netinet/in.c b/sys/netinet/in.c index d78de9d4238e..c671abb52e87 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.199 2017/03/17 17:26:20 roy Exp $ */ +/* $NetBSD: in.c,v 1.200 2017/04/28 05:56:33 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.199 2017/03/17 17:26:20 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.200 2017/04/28 05:56:33 ozaki-r Exp $"); #include "arp.h" @@ -2077,16 +2077,24 @@ in_lltable_delete(struct lltable *llt, u_int flags, lle = in_lltable_find_dst(llt, sin->sin_addr); if (lle == NULL) { -#ifdef DIAGNOSTIC - log(LOG_INFO, "interface address is missing from cache = %p in delete\n", lle); +#ifdef DEBUG + char buf[64]; + sockaddr_format(l3addr, buf, sizeof(buf)); + log(LOG_INFO, "%s: cache for %s is not found\n", + __func__, buf); #endif return (ENOENT); } LLE_WLOCK(lle); lle->la_flags |= LLE_DELETED; -#ifdef DIAGNOSTIC - log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); +#ifdef DEBUG + { + char buf[64]; + sockaddr_format(l3addr, buf, sizeof(buf)); + log(LOG_INFO, "%s: cache for %s (%p) is deleted\n", + __func__, buf, lle); + } #endif if ((lle->la_flags & (LLE_STATIC | LLE_IFADDR)) == LLE_STATIC) llentry_free(lle); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index a9f0dc4d7ef4..c99eb63e2910 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.244 2017/03/02 09:48:20 ozaki-r Exp $ */ +/* $NetBSD: in6.c,v 1.245 2017/04/28 05:56:33 ozaki-r Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.244 2017/03/02 09:48:20 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.245 2017/04/28 05:56:33 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2550,13 +2550,25 @@ in6_lltable_delete(struct lltable *llt, u_int flags, lle = in6_lltable_find_dst(llt, &sin6->sin6_addr); - if (lle == NULL) + if (lle == NULL) { +#ifdef DEBUG + char buf[64]; + sockaddr_format(l3addr, buf, sizeof(buf)); + log(LOG_INFO, "%s: cache for %s is not found\n", + __func__, buf); +#endif return ENOENT; + } LLE_WLOCK(lle); lle->la_flags |= LLE_DELETED; -#ifdef DIAGNOSTIC - log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); +#ifdef DEBUG + { + char buf[64]; + sockaddr_format(l3addr, buf, sizeof(buf)); + log(LOG_INFO, "%s: cache for %s (%p) is deleted\n", + __func__, buf, lle); + } #endif if ((lle->la_flags & (LLE_STATIC | LLE_IFADDR)) == LLE_STATIC) llentry_free(lle);