summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2013-07-04 09:48:50 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2013-07-04 09:48:50 +0000
commite1aada3a39aae8b4fc94078d06ef69a6eeed84b4 (patch)
treebc6662a29330be35567508127c258c6d91ff997d
parent6039aa64c4ad237872c8c929bf6f7786159e575d (diff)
These functions are only used in debug code, so put them under
ifdef ENCDEBUG to make sure we don't use them elsewhere.
-rw-r--r--sys/netinet/ip_ipsp.c4
-rw-r--r--sys/netinet/ip_ipsp.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index f64ce8e2a66..1e99246aa69 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.189 2013/04/11 12:06:25 mpi Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.190 2013/07/04 09:48:48 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -981,6 +981,7 @@ tdb_add_inp(struct tdb *tdb, struct inpcb *inp, int inout)
}
}
+#ifdef ENCDEBUG
/* Return a printable string for the IPv4 address. */
char *
inet_ntoa4(struct in_addr ina)
@@ -1015,6 +1016,7 @@ ipsp_address(union sockaddr_union sa)
return "(unknown address family)";
}
}
+#endif /* ENCDEBUG */
/* Check whether an IP{4,6} address is unspecified. */
int
diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h
index 269fb51d467..c4ecfee8da3 100644
--- a/sys/netinet/ip_ipsp.h
+++ b/sys/netinet/ip_ipsp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.h,v 1.154 2013/04/11 12:06:25 mpi Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.155 2013/07/04 09:48:49 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -502,8 +502,10 @@ do { \
/* Misc. */
uint8_t get_sa_require(struct inpcb *);
+#ifdef ENCDEBUG
char *inet_ntoa4(struct in_addr);
char *ipsp_address(union sockaddr_union);
+#endif /* ENCDEBUG */
/* TDB management routines */
void tdb_add_inp(struct tdb *, struct inpcb *, int);