summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-07-08 15:13:15 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-07-08 15:13:15 +0000
commit9ef2faa8d5965726ba78d1f1d2753f633ac93ecb (patch)
tree3d5d6a383a3fc2b2fbc238a245fe7efdcd400b66 /sys/netinet6
parentcbb0f76de90367564700acbc4242ff5d55a26e88 (diff)
Debug printfs in encdebug were inconsistent, some missing newlines
produced ugly output. Move the function name and the newline into the DPRINTF macro. This simplifies the debug statements. OK tobhe@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_output.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index e11ac43961b..bf7975336db 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.257 2021/05/12 08:09:33 mvs Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.258 2021/07/08 15:13:14 bluhm Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -108,9 +108,14 @@
#include <netinet/ip_esp.h>
#ifdef ENCDEBUG
-#define DPRINTF(x) do { if (encdebug) printf x ; } while (0)
+#define DPRINTF(fmt, args...) \
+ do { \
+ if (encdebug) \
+ printf("%s: " fmt "\n", __func__, ## args); \
+ } while (0)
#else
-#define DPRINTF(x)
+#define DPRINTF(fmt, args...) \
+ do { } while (0)
#endif
#endif /* IPSEC */
@@ -2837,8 +2842,8 @@ ip6_output_ipsec_send(struct tdb *tdb, struct mbuf *m, struct route_in6 *ro,
m->m_pkthdr.ph_rtableid, 1);
rt_mtucloned = 1;
}
- DPRINTF(("%s: spi %08x mtu %d rt %p cloned %d\n", __func__,
- ntohl(tdb->tdb_spi), tdb->tdb_mtu, rt, rt_mtucloned));
+ DPRINTF("spi %08x mtu %d rt %p cloned %d",
+ ntohl(tdb->tdb_spi), tdb->tdb_mtu, rt, rt_mtucloned);
if (rt != NULL) {
rt->rt_mtu = tdb->tdb_mtu;
if (ro != NULL && ro->ro_rt != NULL) {