summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-07-01 05:42:06 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-07-01 05:42:06 +0000
commit767806792f5644c0ba124b5b88937faf0d65f3ac (patch)
tree5d05dc3408ddf9a391be140e88c613ad061ac303
parentb2575613f4a2be51ff6ce7f4035c3b081fa92ced (diff)
Fix remote_negotiation_address attribute; fix sockaddr2text() return
value when zero-filling; log_error()->log_print() consistently.
-rw-r--r--sbin/isakmpd/policy.c4
-rw-r--r--sbin/isakmpd/udp.c4
-rw-r--r--sbin/isakmpd/util.c5
3 files changed, 7 insertions, 6 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index 25872a73dc6..9456ec9cf5a 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.34 2001/06/29 18:52:17 ho Exp $ */
+/* $OpenBSD: policy.c,v 1.35 2001/07/01 05:42:05 angelos Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -643,7 +643,7 @@ policy_callback (char *name)
log_error ("policy_callback: sockaddr2text failed");
goto bad;
}
- memcpy (local_ike_address, addr, sizeof remote_ike_address);
+ memcpy (remote_ike_address, addr, sizeof remote_ike_address);
free (addr);
switch (policy_isakmp_sa->exch_type)
diff --git a/sbin/isakmpd/udp.c b/sbin/isakmpd/udp.c
index 7b228c62ec8..05b8773c01f 100644
--- a/sbin/isakmpd/udp.c
+++ b/sbin/isakmpd/udp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp.c,v 1.38 2001/06/29 22:59:40 angelos Exp $ */
+/* $OpenBSD: udp.c,v 1.39 2001/07/01 05:42:05 angelos Exp $ */
/* $EOM: udp.c,v 1.57 2001/01/26 10:09:57 niklas Exp $ */
/*
@@ -693,7 +693,7 @@ udp_decode_ids (struct transport *t)
sizeof ((struct udp_transport *)t)->dst,
iddst, sizeof iddst, NULL, 0, NI_NUMERICHOST) != 0)
{
- log_error ("udp_decode_ids: getnameinfo () failed");
+ log_print ("udp_decode_ids: getnameinfo () failed");
strcpy (iddst, "<error>");
}
#else
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c
index 3c95c74e218..2e580a8223f 100644
--- a/sbin/isakmpd/util.c
+++ b/sbin/isakmpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.17 2001/06/29 22:59:41 angelos Exp $ */
+/* $OpenBSD: util.c,v 1.18 2001/07/01 05:42:05 angelos Exp $ */
/* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */
/*
@@ -304,6 +304,8 @@ sockaddr2text (struct sockaddr *sa, char **address, int zflag)
*address = malloc (strlen (buf) + 1);
if (*address == NULL)
return -1;
+ strcpy (*address, buf);
+ return 0;
}
else
switch (sa->sa_family)
@@ -377,7 +379,6 @@ sockaddr2text (struct sockaddr *sa, char **address, int zflag)
strcpy (buf, "<error>");
}
- strcpy (*address, buf);
return 0;
}