Module Name:    src
Committed By:   dholland
Date:           Sun Mar 28 03:29:32 UTC 2021

Modified Files:
        src/lib/libc/sys: bind.2 connect.2 send.2

Log Message:
Document EINVAL for out of range socket address lengths.

This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/sys/bind.2
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/connect.2
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/sys/send.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/bind.2
diff -u src/lib/libc/sys/bind.2:1.30 src/lib/libc/sys/bind.2:1.31
--- src/lib/libc/sys/bind.2:1.30	Mon Jul  3 21:32:50 2017
+++ src/lib/libc/sys/bind.2	Sun Mar 28 03:29:31 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bind.2,v 1.30 2017/07/03 21:32:50 wiz Exp $
+.\"	$NetBSD: bind.2,v 1.31 2021/03/28 03:29:31 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)bind.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd April 5, 2015
+.Dd March 27, 2021
 .Dt BIND 2
 .Os
 .Sh NAME
@@ -99,6 +99,8 @@ The socket is already bound to an addres
 the family of the socket and that requested in
 .Fa name->sa_family
 are not equivalent.
+.It Bq Er EINVAL
+The socket address length passed was outside the allowable range.
 .It Bq Er ENOTSOCK
 .Fa s
 is not a socket.

Index: src/lib/libc/sys/connect.2
diff -u src/lib/libc/sys/connect.2:1.28 src/lib/libc/sys/connect.2:1.29
--- src/lib/libc/sys/connect.2:1.28	Mon May 31 12:16:20 2010
+++ src/lib/libc/sys/connect.2	Sun Mar 28 03:29:31 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: connect.2,v 1.28 2010/05/31 12:16:20 njoly Exp $
+.\"	$NetBSD: connect.2,v 1.29 2021/03/28 03:29:31 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)connect.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd May 18, 2004
+.Dd March 27, 2021
 .Dt CONNECT 2
 .Os
 .Sh NAME
@@ -97,6 +97,8 @@ is not a valid descriptor.
 .It Bq Er ENOTSOCK
 .Fa s
 is a descriptor for a file, not a socket.
+.It Bq Er EINVAL
+The socket address length passed was outside the allowable range.
 .It Bq Er EADDRNOTAVAIL
 The specified address is not available on this machine.
 .It Bq Er EAFNOSUPPORT

Index: src/lib/libc/sys/send.2
diff -u src/lib/libc/sys/send.2:1.32 src/lib/libc/sys/send.2:1.33
--- src/lib/libc/sys/send.2:1.32	Sun Jun 11 17:01:26 2017
+++ src/lib/libc/sys/send.2	Sun Mar 28 03:29:31 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: send.2,v 1.32 2017/06/11 17:01:26 abhinav Exp $
+.\"	$NetBSD: send.2,v 1.33 2021/03/28 03:29:31 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)send.2	8.2 (Berkeley) 2/21/94
 .\"
-.Dd June 22, 2012
+.Dd March 27, 2021
 .Dt SEND 2
 .Os
 .Sh NAME
@@ -217,6 +217,8 @@ The destination for the message is unrea
 .It Bq Er EINVAL
 The total length of the I/O is more than can be expressed by the ssize_t
 return value.
+.It Bq Er EINVAL
+The socket address length passed was outside the allowable range.
 .It Bq Er EMSGSIZE
 The socket requires that message be sent atomically,
 and the size of the message to be sent made this impossible.

Reply via email to