summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/dpd.c
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2004-06-20 17:17:36 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2004-06-20 17:17:36 +0000
commitdaefe33e51f796ec859b8a5545e90394afe00af9 (patch)
tree7bab3c8a8dab66dd6b9c16ef2f66b3f3e81acfa9 /sbin/isakmpd/dpd.c
parent7dbb36820e270a6f9f37634264b8474a613d0247 (diff)
Make the payload array in struct message dynamic, since we need to handle
payloads in the private range, such as the pre-RFC NAT-D/NAT-OA. Replace TAILQ_FIRST(&msg->payload[i]) instances with function calls.
Diffstat (limited to 'sbin/isakmpd/dpd.c')
-rw-r--r--sbin/isakmpd/dpd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/isakmpd/dpd.c b/sbin/isakmpd/dpd.c
index 6cc52ac17e7..9621fa1b23b 100644
--- a/sbin/isakmpd/dpd.c
+++ b/sbin/isakmpd/dpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpd.c,v 1.1 2004/06/20 15:20:06 ho Exp $ */
+/* $OpenBSD: dpd.c,v 1.2 2004/06/20 17:17:34 ho Exp $ */
/*
* Copyright (c) 2004 Håkan Olsson. All rights reserved.
@@ -198,8 +198,7 @@ dpd_initiator_send_notify(struct message *msg)
static int
dpd_initiator_recv_ack(struct message *msg)
{
- struct payload *p =
- TAILQ_FIRST(&msg->payload[ISAKMP_PAYLOAD_NOTIFY]);
+ struct payload *p = payload_first(msg, ISAKMP_PAYLOAD_NOTIFY);
struct sa *isakmp_sa = msg->isakmp_sa;
struct timeval tv;
u_int32_t rseq;
@@ -259,8 +258,7 @@ dpd_initiator_recv_ack(struct message *msg)
static int
dpd_responder_recv_notify(struct message *msg)
{
- struct payload *p =
- TAILQ_FIRST(&msg->payload[ISAKMP_PAYLOAD_NOTIFY]);
+ struct payload *p = payload_first(msg, ISAKMP_PAYLOAD_NOTIFY);
struct sa *isakmp_sa = msg->isakmp_sa;
struct timeval tv;
u_int32_t rseq;