summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipip.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2015-04-14 14:20:02 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2015-04-14 14:20:02 +0000
commit63675cfb1c78af0c144d56eebf10e405b371b9d8 (patch)
treedeb12b887c6036fa5ab1dfa0371643a65d2fc6d1 /sys/netinet/ip_ipip.c
parente02a1355682b8cfa42063a33a6a10a2eaae840a9 (diff)
make ipsp_address thread safe; ok mpi
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r--sys/netinet/ip_ipip.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 4128e3d3990..7f104257f66 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.57 2015/04/10 13:58:20 dlg Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.58 2015/04/14 14:20:01 mikeb Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -391,6 +391,9 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int dummy,
#ifdef INET6
struct ip6_hdr *ip6, *ip6o;
#endif /* INET6 */
+#ifdef ENCDEBUG
+ char buf[INET6_ADDRSTRLEN];
+#endif
/* XXX Deal with empty TDB source/destination addresses. */
@@ -405,7 +408,8 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int dummy,
DPRINTF(("ipip_output(): unspecified tunnel endpoind "
"address in SA %s/%08x\n",
- ipsp_address(tdb->tdb_dst), ntohl(tdb->tdb_spi)));
+ ipsp_address(&tdb->tdb_dst, buf, sizeof(buf)),
+ ntohl(tdb->tdb_spi)));
ipipstat.ipips_unspec++;
m_freem(m);
@@ -490,7 +494,8 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int dummy,
DPRINTF(("ipip_output(): unspecified tunnel endpoind "
"address in SA %s/%08x\n",
- ipsp_address(tdb->tdb_dst), ntohl(tdb->tdb_spi)));
+ ipsp_address(&tdb->tdb_dst, buf, sizeof(buf)),
+ ntohl(tdb->tdb_spi)));
ipipstat.ipips_unspec++;
m_freem(m);