summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/net/rcmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 28420d20ebe..643604f3b30 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -235,6 +235,7 @@ rresvport(alport)
(void)close(s);
return (-1);
}
+ sin.sin_port = 0;
if (bindresvport(s, &sin) == -1) {
(void)close(s);
return (-1);