Bug#607979: The argument for IP_MULTICAST_IF socket option

2013-01-27 Thread Simon Paillard
Control: tag -1 +confirmed +upstream , retitle -1 ip(7) incorrect structure for 
IP_MULTICAST_IF socket option

Hi,

On Sun, Dec 26, 2010 at 12:16:00AM +0900, Tanaka Akira wrote:
 ip(7) describes that the argument for IP_MULTICAST_IF is ip_mreqn or ip_mreq:
 
IP_MULTICAST_IF
 Set the local device for a multicast  socket.   Argument  is  an
 ip_mreqn or ip_mreq structure similar to IP_ADD_MEMBERSHIP.
 
 But it should be ip_mreqn or in_addr.
 It is different from IP_ADD_MEMBERSHIP.
 
 At the original API of BSD multicast, IP_MULTICAST_IF takes struct in_addr.
 http://www.kohala.com/start/mcast.api.txt
 
 do_ip_setsockopt() in Linux net/ipv4/ip_sockglue.c seems to support
 ip_mreqn and in_addr.

Indeed, your remark is applicable to all Linux kernels before v3.5.

Then it has been fixed in May 2012, it now accepts ip_mreqn, old ip_mreq, and 
in_addr
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commitdiff;h=3a084ddb4bf299a6e898a9a07c89f3917f0713f7

However, I wonder if Michael wants to document old kernel interfaces (i.e. 
mention in_addr).

A patch added (without mention of in_addr though).

-- 
Simon Paillard
From 589b8366080d4e6ddcd6006180b2a22573192c16 Mon Sep 17 00:00:00 2001
From: Simon Paillard spaill...@debian.org
Date: Sun, 27 Jan 2013 23:56:04 +0100
Subject: [PATCH] ip.7: IP_MULTICAST_IF setsockopt recognizes struct mreq
 (compatibility)

Kernel added compatibility only recently in
3a084ddb4bf299a6e898a9a07c89f3917f0713f7
See: http://bugs.debian.org/607979
---
 man7/ip.7 |3 +++
 1 file changed, 3 insertions(+)

diff --git a/man7/ip.7 b/man7/ip.7
index ed8cbfc..b750863 100644
--- a/man7/ip.7
+++ b/man7/ip.7
@@ -424,6 +424,9 @@ Argument is an
 .I ip_mreqn
 or
 .I ip_mreq
+.\ net: IP_MULTICAST_IF setsockopt now recognizes struct mreq
+.\ Commit: 3a084ddb4bf299a6e898a9a07c89f3917f0713f7
+(since Linux 3.5)
 structure similar to
 .BR IP_ADD_MEMBERSHIP .
 .IP
-- 
1.7.10.4



Bug#607979: The argument for IP_MULTICAST_IF socket option

2010-12-25 Thread Tanaka Akira
Package: manpages
Version: 3.05-1

ip(7) describes that the argument for IP_MULTICAST_IF is ip_mreqn or ip_mreq:

   IP_MULTICAST_IF
  Set the local device for a multicast  socket.   Argument  is  an
  ip_mreqn or ip_mreq structure similar to IP_ADD_MEMBERSHIP.

But it should be ip_mreqn or in_addr.
It is different from IP_ADD_MEMBERSHIP.

At the original API of BSD multicast, IP_MULTICAST_IF takes struct in_addr.
http://www.kohala.com/start/mcast.api.txt

do_ip_setsockopt() in Linux net/ipv4/ip_sockglue.c seems to support
ip_mreqn and in_addr.
-- 
Tanaka Akira



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org