summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-08-17 09:58:10 +0000
committermpi <mpi@openbsd.org>2015-08-17 09:58:10 +0000
commit35075f95e99e46ca8c3b92348a3e75cbc9dce2bc (patch)
tree654a5a781dfee32f236f50167e62f922fc5f5e31 /sys/netinet6
parentRemove unused variable in rt_ifa_add(), prodded by bluhm@ (diff)
downloadwireguard-openbsd-35075f95e99e46ca8c3b92348a3e75cbc9dce2bc.tar.xz
wireguard-openbsd-35075f95e99e46ca8c3b92348a3e75cbc9dce2bc.zip
Use __func__ rather than the function name in log(9) calls to remove
some grep output noise.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 138909aa2f1..47ebfc69ef4 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.143 2015/07/16 15:31:35 mpi Exp $ */
+/* $OpenBSD: nd6.c,v 1.144 2015/08/17 09:58:10 mpi Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -122,7 +122,7 @@ nd6_init(void)
static int nd6_init_done = 0;
if (nd6_init_done) {
- log(LOG_NOTICE, "nd6_init called more than once(ignored)\n");
+ log(LOG_NOTICE, "%s called more than once\n", __func__);
return;
}
@@ -190,9 +190,8 @@ nd6_setmtu0(struct ifnet *ifp, struct nd_ifinfo *ndi)
* log to the case of changing the MTU, not initializing it.
*/
if (omaxmtu >= IPV6_MMTU && ndi->maxmtu < IPV6_MMTU) {
- log(LOG_NOTICE, "nd6_setmtu0: "
- "new link MTU on %s (%lu) is too small for IPv6\n",
- ifp->if_xname, (unsigned long)ndi->maxmtu);
+ log(LOG_NOTICE, "%s: link MTU on %s (%lu) too small for IPv6\n",
+ __func__, ifp->if_xname, (unsigned long)ndi->maxmtu);
}
}
@@ -676,9 +675,8 @@ nd6_lookup(struct in6_addr *addr6, int create, struct ifnet *ifp,
&rt, rtableid)) != 0) {
#if 0
char ip[INET6_ADDRSTRLEN];
- log(LOG_ERR,
- "nd6_lookup: failed to add route for a "
- "neighbor(%s), errno=%d\n",
+ log(LOG_ERR, "%s: failed to add route for a "
+ "neighbor(%s), errno=%d\n", __func__,
inet_ntop(AF_INET6, addr6, ip, sizeof(ip)),
e);
#endif
@@ -712,8 +710,8 @@ nd6_lookup(struct in6_addr *addr6, int create, struct ifnet *ifp,
(ifp && rt->rt_ifa->ifa_ifp != ifp)) {
if (create) {
char addr[INET6_ADDRSTRLEN];
- nd6log((LOG_DEBUG,
- "nd6_lookup: failed to lookup %s (if = %s)\n",
+ nd6log((LOG_DEBUG, "%s: failed to lookup %s (if=%s)\n",
+ __func__,
inet_ntop(AF_INET6, addr6, addr, sizeof(addr)),
ifp ? ifp->if_xname : "unspec"));
}
@@ -1625,9 +1623,8 @@ nd6_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr_in6 *dst,
!(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) {
char addr[INET6_ADDRSTRLEN];
- log(LOG_DEBUG,
- "nd6_output: can't allocate llinfo for %s "
- "(ln=%p, rt=%p)\n",
+ log(LOG_DEBUG, "%s: can't allocate llinfo for %s "
+ "(ln=%p, rt=%p)\n", __func__,
inet_ntop(AF_INET6, &dst->sin6_addr,
addr, sizeof(addr)),
ln, rt);
@@ -1758,7 +1755,7 @@ nd6_storelladdr(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
}
if (rt->rt_gateway->sa_family != AF_LINK) {
- printf("nd6_storelladdr: something odd happens\n");
+ printf("%s: something odd happens\n", __func__);
m_freem(m);
return (EINVAL);
}