summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2000-01-26 03:43:17 +0000
committerderaadt <deraadt@openbsd.org>2000-01-26 03:43:17 +0000
commit6fff0550923c65faffe312e66fa28a94d1487418 (patch)
tree99c3748dc0a2753b4b91888913ab56cea7f81f7f /lib/libc/net
parentrepair (diff)
downloadwireguard-openbsd-6fff0550923c65faffe312e66fa28a94d1487418.tar.xz
wireguard-openbsd-6fff0550923c65faffe312e66fa28a94d1487418.zip
new bindresvport() semantics that itojun, shin, jean-luc and i have agreed on, which will be happy for the future. bindresvport_sa() for sockaddr *, too. docs later..
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/rresvport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/net/rresvport.c b/lib/libc/net/rresvport.c
index 21387aa3b13..c807adfb83e 100644
--- a/lib/libc/net/rresvport.c
+++ b/lib/libc/net/rresvport.c
@@ -34,7 +34,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rresvport.c,v 1.4 1999/12/17 20:48:03 deraadt Exp $";
+static char *rcsid = "$OpenBSD: rresvport.c,v 1.5 2000/01/26 03:43:20 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -108,7 +108,8 @@ rresvport_af(alport, af)
}
*portp = 0;
- if (bindresvport_af(s, sa, af) == -1) {
+ sa->sa_family = af;
+ if (bindresvport_sa(s, sa) == -1) {
(void)close(s);
return (-1);
}