summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-01-26 15:21:37 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-01-26 15:21:37 +0000
commit1e3d40d87800ad3fa84f30f370b3afcd3757ab04 (patch)
tree6d1349123ae4efed0b3d87d66da727d56d27ded8
parent3ecbfc92f918f53de20a36a7c97f87e34561c78d (diff)
Merge with EOM 1.12
date: 2000/01/25 06:13:15; author: angelos; state: Exp; lines: +7 -4 Handle IPV4_ADDR as a Phase 1 ID
-rw-r--r--sbin/isakmpd/ike_phase_1.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sbin/isakmpd/ike_phase_1.c b/sbin/isakmpd/ike_phase_1.c
index 4d7fba808e3..d1f57283d01 100644
--- a/sbin/isakmpd/ike_phase_1.c
+++ b/sbin/isakmpd/ike_phase_1.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ike_phase_1.c,v 1.8 1999/10/01 14:07:42 niklas Exp $ */
-/* $EOM: ike_phase_1.c,v 1.11 1999/09/29 22:05:38 ho Exp $ */
+/* $OpenBSD: ike_phase_1.c,v 1.9 2000/01/26 15:21:36 niklas Exp $ */
+/* $EOM: ike_phase_1.c,v 1.12 2000/01/25 06:13:15 angelos Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist. All rights reserved.
@@ -790,11 +790,14 @@ ike_phase_1_send_ID (struct message *msg)
SET_ISAKMP_ID_TYPE (buf, id_type);
switch (id_type)
{
-#ifdef notyet
case IPSEC_ID_IPV4_ADDR:
- /* XXX not implemented yet. */
+ msg->transport->vtbl->get_src (msg->transport, &src, &src_len);
+
+ /* Already in network byteorder. */
+ memcpy (buf + ISAKMP_ID_DATA_OFF,
+ &((struct sockaddr_in *)src)->sin_addr.s_addr,
+ sizeof (in_addr_t));
break;
-#endif
case IPSEC_ID_FQDN:
case IPSEC_ID_USER_FQDN:
memcpy (buf + ISAKMP_ID_DATA_OFF, conf_get_str (my_id, "Name"), sz);