diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-04-30 11:47:27 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-04-30 11:47:27 +0000 |
commit | 58651bae8e25107cb390f9f87d6dc1ce709ce666 (patch) | |
tree | 0827938cb7ada6e94e544dfed189d04606b9008b /sbin | |
parent | d40408f6d57b95b8c99cb59878b5b94a3a1dd384 (diff) |
Merge with EOM 1.100
author: niklas
Try to fix the retransmit business, so info exchanges does not retransmit
author: niklas
Remove unneccesary code
author: niklas
Keep track of messages in the send queue from the exchange point of view.
author: niklas
Free the last sent message when freeing an exchange
author: niklas
New message_drop API. Generate real INVALID_COOKIE notification.
Generate informational exchanges in phase 1 too. Really get these
messages to the wire
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/exchange.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index a703cfad4e2..7f94ceacbb7 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,5 +1,5 @@ -/* $OpenBSD: exchange.c,v 1.16 1999/04/27 21:07:40 niklas Exp $ */ -/* $EOM: exchange.c,v 1.95 1999/04/27 09:40:33 niklas Exp $ */ +/* $OpenBSD: exchange.c,v 1.17 1999/04/30 11:47:26 niklas Exp $ */ +/* $EOM: exchange.c,v 1.100 1999/04/29 22:11:50 niklas Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -278,11 +278,13 @@ exchange_run (struct message *msg) * see retransmits of the last message of the peer * later. */ + msg->flags |= MSG_LAST; if (exchange->step > 0) - msg->flags |= MSG_LAST; - if (exchange->last_sent) - message_free (exchange->last_sent); - exchange->last_sent = msg; + { + if (exchange->last_sent) + message_free (exchange->last_sent); + exchange->last_sent = msg; + } /* * After we physically have sent our last message we need to @@ -360,7 +362,7 @@ exchange_run (struct message *msg) case -1: log_print ("exchange_run: exchange_validate failed"); /* XXX Is this the best error notification type? */ - message_drop (msg, ISAKMP_NOTIFY_PAYLOAD_MALFORMED, 0, 0, 1); + message_drop (msg, ISAKMP_NOTIFY_PAYLOAD_MALFORMED, 0, 1, 1); return; } } @@ -1129,6 +1131,10 @@ exchange_free_aux (void *v_exch) if (exchange->last_received) message_free (exchange->last_received); + if (exchange->last_sent) + message_free (exchange->last_sent); + if (exchange->in_transit) + message_free (exchange->in_transit); if (exchange->nonce_i) free (exchange->nonce_i); if (exchange->nonce_r) |