tags 216092 fixed-upstream
thanks

Minor miracle: sometimes I look at old Debian bug reports.

> The current manpages indicates the following regarding the EINVAL error:
>
>        EINVAL optlen invalid in setsockopt
>
> In some cases, the error can also be returned for invalid values of optval.
> In particular, when using the IP_ADD_MEMBERSHIP option, EINVAL is returned
> when the provided multicast address (struct ip_mreqn's imr_multiaddr field)
> is invalid (not within the 224.0.0.0-239.255.255.255 range).

Okay -- I verified by reading the relevant source.

I've applied patches to ip.7 and getsockopt.2, as below.  The changes
will be in man-pages-3.12.  Sorry it took so long for someone to respond
to your report Christian.

Cheers,

Michael

--- a/man7/ip.7
+++ b/man7/ip.7
@@ -648,7 +648,12 @@ struct ip_mreqn {
 .I imr_multiaddr
 contains the address of the multicast group the application
 wants to join or leave.
-It must be a valid multicast address.
+It must be a valid multicast address
+.\" (i.e., within the 224.0.0.0-239.255.255.255 range)
+(or
+.BR setsockopt (2)
+fails with the error
+.BR EINVAL ).
 .I imr_address
 is the address of the local interface with which the system
 should join the multicast

--- a/man2/getsockopt.2
+++ b/man2/getsockopt.2
@@ -154,6 +154,12 @@ is not in a valid part of the process address space.
 .I optlen
 invalid in
 .BR setsockopt ().
+In some cases this error can also occur for an invalid value in
+.IR optval
+(e.g., for the
+.B IP_ADD_MEMBERSHIP
+option described in
+.BR ip (7)).
 .TP
 .B ENOPROTOOPT
 The option is unknown at the level indicated.

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to