summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/log.c
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2004-06-21 16:37:31 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2004-06-21 16:37:31 +0000
commit8bad71778c1ae48fc30dcd73c1b9d60736288c3d (patch)
tree581a29fbd8ddfb2b7683b4cd58be489e5aedaa21 /sbin/isakmpd/log.c
parent53dd804e65cd1bf7a2c072e04cd765e997065f53 (diff)
Don't write too much IKE data in packet capture
Diffstat (limited to 'sbin/isakmpd/log.c')
-rw-r--r--sbin/isakmpd/log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c
index 68df655ff9f..469f238c319 100644
--- a/sbin/isakmpd/log.c
+++ b/sbin/isakmpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.46 2004/06/21 16:01:56 ho Exp $ */
+/* $OpenBSD: log.c,v 1.47 2004/06/21 16:37:30 ho Exp $ */
/* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */
/*
@@ -596,8 +596,10 @@ setup_ip4:
/* Write to pcap file. */
fwrite(&hdr, hdrlen, 1, packet_log); /* pcap + IP */
fwrite(&udp, sizeof(struct udphdr), 1, packet_log); /* UDP */
- if (add_espmarker)
+ if (add_espmarker) {
fwrite(&espmarker, sizeof espmarker, 1, packet_log);
+ datalen -= sizeof espmarker;
+ }
fwrite(packet_buf, datalen, 1, packet_log); /* IKE-data */
fflush(packet_log);
}