summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2002-01-19 20:12:03 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2002-01-19 20:12:03 +0000
commit30f247ebd024944044867f908e9b552b29acb7ab (patch)
tree4c4246dc34479046e28b35f5bf3075603104fe13 /sbin
parent1018dd408c2ba228507a7d0753664d7569554076 (diff)
Fix bogosity with sa_len value assignment...I wonder how this ever
worked (but it did, until very recently).
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/util.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c
index b8465d19bf8..b469056f9b3 100644
--- a/sbin/isakmpd/util.c
+++ b/sbin/isakmpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.23 2001/10/26 13:29:26 ho Exp $ */
+/* $OpenBSD: util.c,v 1.24 2002/01/19 20:12:02 angelos Exp $ */
/* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */
/*
@@ -461,7 +461,15 @@ util_ntoa (char **buf, int af, u_int8_t *addr)
memset (&from, 0, fromlen);
sfrom->sa_family = af;
#ifndef USE_OLD_SOCKADDR
- sfrom->sa_len = sysdep_sa_len (sfrom);
+ switch (af)
+ {
+ case AF_INET:
+ sfrom->sa_len = sizeof (struct sockaddr_in);
+ break;
+ case AF_INET6:
+ sfrom->sa_len = sizeof (struct sockaddr_in6);
+ break;
+ }
#endif
memcpy (sockaddr_addrdata (sfrom), addr, sockaddr_addrlen (sfrom));