summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayden Markatchev <nayden@cvs.openbsd.org>2019-11-29 16:41:03 +0000
committerNayden Markatchev <nayden@cvs.openbsd.org>2019-11-29 16:41:03 +0000
commit589f09017887941a1afbd780f77b4d4dd18da2e4 (patch)
tree1bb500c85e933a2008cf6d5f49abc38445e09b3a
parent1a15c9043755c8389aea3c923af1f9343c98b117 (diff)
add __func__ to panic() and printf() calls in sys/netinet6/*
ok benno@ mortimer@
-rw-r--r--sys/netinet6/icmp6.c4
-rw-r--r--sys/netinet6/in6_pcb.c6
-rw-r--r--sys/netinet6/ip6_divert.c4
-rw-r--r--sys/netinet6/ip6_input.c6
-rw-r--r--sys/netinet6/ip6_output.c8
-rw-r--r--sys/netinet6/nd6.c10
-rw-r--r--sys/netinet6/nd6_nbr.c16
-rw-r--r--sys/netinet6/raw_ip6.c10
8 files changed, 32 insertions, 32 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 7041566ce95..9f609ccff0b 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.229 2018/12/25 19:28:25 denis Exp $ */
+/* $OpenBSD: icmp6.c,v 1.230 2019/11/29 16:41:01 nayden Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -225,7 +225,7 @@ icmp6_mtudisc_callback_register(void (*func)(struct sockaddr_in6 *, u_int))
mc = malloc(sizeof(*mc), M_PCB, M_NOWAIT);
if (mc == NULL)
- panic("icmp6_mtudisc_callback_register");
+ panic("%s", __func__);
mc->mc_func = func;
LIST_INSERT_HEAD(&icmp6_mtudisc_callbacks, mc, mc_list);
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 75c271a0a17..36057b59a8d 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.109 2019/10/17 00:51:28 dlg Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.110 2019/11/29 16:41:01 nayden Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -376,8 +376,8 @@ in6_pcbnotify(struct inpcbtable *table, struct sockaddr_in6 *dst,
return (0);
if (IN6_IS_ADDR_V4MAPPED(&dst->sin6_addr)) {
#ifdef DIAGNOSTIC
- printf("Huh? Thought in6_pcbnotify() never got "
- "called with mapped!\n");
+ printf("%s: Huh? Thought we never got "
+ "called with mapped!\n", __func__);
#endif
return (0);
}
diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c
index f99f87d4f8a..352e172b433 100644
--- a/sys/netinet6/ip6_divert.c
+++ b/sys/netinet6/ip6_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_divert.c,v 1.59 2019/02/04 21:40:52 bluhm Exp $ */
+/* $OpenBSD: ip6_divert.c,v 1.60 2019/11/29 16:41:01 nayden Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -301,7 +301,7 @@ divert6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr,
break;
default:
- panic("divert6_usrreq");
+ panic("%s", __func__);
}
release:
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index ef84483a267..3383def8cd2 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.219 2019/08/21 15:32:18 florian Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.220 2019/11/29 16:41:01 nayden Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -144,7 +144,7 @@ ip6_init(void)
pr = pffindproto(PF_INET6, IPPROTO_RAW, SOCK_RAW);
if (pr == NULL)
- panic("ip6_init");
+ panic("%s", __func__);
for (i = 0; i < IPPROTO_MAX; i++)
ip6_protox[i] = pr - inet6sw;
for (pr = inet6domain.dom_protosw;
@@ -1204,7 +1204,7 @@ ip6_nexthdr(struct mbuf *m, int off, int proto, int *nxtp)
/* just in case */
if (m == NULL)
- panic("ip6_nexthdr: m == NULL");
+ panic("%s: m == NULL", __func__);
if ((m->m_flags & M_PKTHDR) == 0 || m->m_pkthdr.len < off)
return -1;
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 66b68130ac7..219080d5c7a 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.244 2019/06/10 16:32:51 mpi Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.245 2019/11/29 16:41:01 nayden Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -174,7 +174,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro,
#ifdef IPSEC
if (inp && (inp->inp_flags & INP_IPV6) == 0)
- panic("ip6_output: IPv4 pcb is passed");
+ panic("%s: IPv4 pcb is passed", __func__);
#endif /* IPSEC */
ip6 = mtod(m, struct ip6_hdr *);
@@ -295,7 +295,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro,
*/
if (exthdrs.ip6e_dest2) {
if (!hdrsplit)
- panic("assumption failed: hdr not split");
+ panic("%s: assumption failed: hdr not split", __func__);
exthdrs.ip6e_dest2->m_next = m->m_next;
m->m_next = exthdrs.ip6e_dest2;
*mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt;
@@ -1761,7 +1761,7 @@ ip6_getpcbopt(struct ip6_pktopts *pktopt, int optname, struct mbuf *m)
break;
default: /* should not happen */
#ifdef DIAGNOSTIC
- panic("ip6_getpcbopt: unexpected option");
+ panic("%s: unexpected option", __func__);
#endif
return (ENOPROTOOPT);
}
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index db2fda85e74..aba0435a0e3 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.228 2019/11/07 11:23:24 krw Exp $ */
+/* $OpenBSD: nd6.c,v 1.229 2019/11/29 16:41:01 nayden Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -177,7 +177,7 @@ nd6_option(union nd_opts *ndopts)
int olen;
if (!ndopts)
- panic("ndopts == NULL in nd6_option");
+ panic("%s: ndopts == NULL", __func__);
if (!ndopts->nd_opts_last)
panic("%s: uninitialized ndopts", __func__);
if (!ndopts->nd_opts_search)
@@ -228,7 +228,7 @@ nd6_options(union nd_opts *ndopts)
int i = 0;
if (!ndopts)
- panic("ndopts == NULL in nd6_options");
+ panic("%s: ndopts == NULL", __func__);
if (!ndopts->nd_opts_last)
panic("%s: uninitialized ndopts", __func__);
if (!ndopts->nd_opts_search)
@@ -1091,9 +1091,9 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr,
int newstate = 0;
if (!ifp)
- panic("ifp == NULL in nd6_cache_lladdr");
+ panic("%s: ifp == NULL", __func__);
if (!from)
- panic("from == NULL in nd6_cache_lladdr");
+ panic("%s: from == NULL", __func__);
/* nothing must be updated for unspecified address */
if (IN6_IS_ADDR_UNSPECIFIED(from))
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 3b9354bae79..b4ffd7a009d 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.128 2019/10/18 18:35:32 benno Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.129 2019/11/29 16:41:02 nayden Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -377,9 +377,9 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
#ifdef DIAGNOSTIC
if (max_linkhdr + maxlen >= MCLBYTES) {
- printf("nd6_ns_output: max_linkhdr + maxlen >= MCLBYTES "
- "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES);
- panic("nd6_ns_output: insufficient MCLBYTES");
+ printf("%s: max_linkhdr + maxlen >= MCLBYTES "
+ "(%d + %d > %d)\n", __func__, max_linkhdr, maxlen, MCLBYTES);
+ panic("%s: insufficient MCLBYTES", __func__);
/* NOTREACHED */
}
#endif
@@ -893,9 +893,9 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
#ifdef DIAGNOSTIC
if (max_linkhdr + maxlen >= MCLBYTES) {
- printf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES "
- "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES);
- panic("nd6_na_output: insufficient MCLBYTES");
+ printf("%s: max_linkhdr + maxlen >= MCLBYTES "
+ "(%d + %d > %d)\n", __func__, max_linkhdr, maxlen, MCLBYTES);
+ panic("%s: insufficient MCLBYTES", __func__);
/* NOTREACHED */
}
#endif
@@ -1323,7 +1323,7 @@ nd6_dad_ns_input(struct ifaddr *ifa)
int duplicate;
if (!ifa)
- panic("ifa == NULL in nd6_dad_ns_input");
+ panic("%s: ifa == NULL", __func__);
duplicate = 0;
dp = nd6_dad_find(ifa);
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 687574617a8..93daab77cec 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.136 2019/04/23 11:01:54 bluhm Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.137 2019/11/29 16:41:02 nayden Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -580,7 +580,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
case PRU_ABORT:
soisdisconnected(so);
if (in6p == NULL)
- panic("rip6_detach");
+ panic("%s", __func__);
#ifdef MROUTING
if (so == ip6_mrouter[in6p->inp_rtableid])
ip6_mrouter_done(so);
@@ -698,7 +698,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
break;
default:
- panic("rip6_usrreq");
+ panic("%s", __func__);
}
release:
if (req != PRU_RCVD && req != PRU_RCVOOB && req != PRU_SENSE) {
@@ -715,7 +715,7 @@ rip6_attach(struct socket *so, int proto)
int error;
if (so->so_pcb)
- panic("rip6_attach");
+ panic("%s", __func__);
if ((so->so_state & SS_PRIV) == 0)
return (EACCES);
if (proto < 0 || proto >= IPPROTO_MAX)
@@ -749,7 +749,7 @@ rip6_detach(struct socket *so)
soassertlocked(so);
if (in6p == NULL)
- panic("rip6_detach");
+ panic("%s", __func__);
#ifdef MROUTING
if (so == ip6_mrouter[in6p->inp_rtableid])
ip6_mrouter_done(so);