diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-07-01 06:00:33 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-07-01 06:00:33 +0000 |
commit | d687d607902b572f5c4f2e3c1da7c7bb9fa8346d (patch) | |
tree | a0bcb2ab05c6acea2db7b8af3d32c759297679c9 /sbin | |
parent | 767806792f5644c0ba124b5b88937faf0d65f3ac (diff) |
Pass the right arguments to getnameinfo()
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/udp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sbin/isakmpd/udp.c b/sbin/isakmpd/udp.c index 05b8773c01f..e42e23af62d 100644 --- a/sbin/isakmpd/udp.c +++ b/sbin/isakmpd/udp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp.c,v 1.39 2001/07/01 05:42:05 angelos Exp $ */ +/* $OpenBSD: udp.c,v 1.40 2001/07/01 06:00:32 angelos Exp $ */ /* $EOM: udp.c,v 1.57 2001/01/26 10:09:57 niklas Exp $ */ /* @@ -70,7 +70,6 @@ #define SO_REUSEPORT SO_REUSEADDR #endif -/* XXX IPv4 specific. */ struct udp_transport { struct transport transport; struct sockaddr *src; @@ -681,16 +680,16 @@ udp_decode_ids (struct transport *t) char idsrc[256], iddst[256]; #ifdef HAVE_GETNAMEINFO - if (getnameinfo ((struct sockaddr *)&((struct udp_transport *)t)->src, - sizeof ((struct udp_transport *)t)->src, + if (getnameinfo (((struct udp_transport *)t)->src, + ((struct udp_transport *)t)->src->sa_len, idsrc, sizeof idsrc, NULL, 0, NI_NUMERICHOST) != 0) { log_print ("udp_decode_ids: getnameinfo () failed"); strcpy (idsrc, "<error>"); } - if (getnameinfo ((struct sockaddr *)&((struct udp_transport *)t)->dst, - sizeof ((struct udp_transport *)t)->dst, + if (getnameinfo (((struct udp_transport *)t)->dst, + ((struct udp_transport *)t)->dst->sa_len, iddst, sizeof iddst, NULL, 0, NI_NUMERICHOST) != 0) { log_print ("udp_decode_ids: getnameinfo () failed"); |