Bug 211 - IP SSM multicast, IGMPv3, RFC3678 support missing
Summary: IP SSM multicast, IGMPv3, RFC3678 support missing
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.3
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
: 5 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-09 17:27 UTC by Wesley W. Terpstra
Modified: 2019-04-10 11:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
A first version of SSM multicast for libc (799 bytes, patch)
2004-06-09 17:29 UTC, Wesley W. Terpstra
Details | Diff
Patch to implement basic API, start of advanced API (1.78 KB, patch)
2004-07-13 19:57 UTC, Charles R. Anderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wesley W. Terpstra 2004-06-09 17:27:09 UTC
Glibc is presently missing support for the API defined in RFC 3678.
The linux kernel (>= 2.6.0) supports this API.

I have attached a patch which add the necessary fields to bits/in.h.
This includes both IGMPv3 (IPv4) and MLDv2 (IPv6) versions.

However, the functions get/setipv4sourcefilter and get/setsourcefilter still
need to be added to netinet/in.h.

sys/sockio.h should also be extended.
Comment 1 Wesley W. Terpstra 2004-06-09 17:29:02 UTC
Created attachment 109 [details]
A first version of SSM multicast for libc

This patch alone does not satisfy RFC3678.
Hopefully, however, it is enough to start glibc people fixing this.
Comment 2 Charles R. Anderson 2004-07-12 23:50:41 UTC
sockio.h ioctl interface is obsolete according to this:

http://www.uwsg.indiana.edu/hypermail/linux/kernel/0407.1/1084.html
Comment 3 Charles R. Anderson 2004-07-12 23:56:19 UTC
*** Bug 5 has been marked as a duplicate of this bug. ***
Comment 4 Wesley W. Terpstra 2004-07-13 09:31:58 UTC
Subject: Re:  IP SSM multicast support missing

On Mon, Jul 12, 2004 at 11:50:41PM -0000, cra at wpi dot edu wrote:
> ------- Additional Comments From cra at wpi dot edu  2004-07-12 23:50 -------
> sockio.h ioctl interface is obsolete according to this:
> 
> http://www.uwsg.indiana.edu/hypermail/linux/kernel/0407.1/1084.html

This does not say that the setsockopt interface is obsolete.
It is not.

The patch I included added the options and structures needed to use the
setsockopt interface. There is also a full-state interface I did not do.

The setsockopt defines and structures I attached ARE included in the kernel
and conform to RFC 3678 which (afaik) is not obsolete. Please note that RFC
3678 is recent (Jan, 2004) and should represent the current state of the art.

The SIOC??MSFILTER interface is mentioned in Section 8 Appendix A of RFC
3678 as historic. I can believe that it is obsolete since it is not included
in the kernel tree.

These interfaces are not the same.

There are three interfaces to multicast:
	Delta based (very old, but still used and in kernel) -- my patch
	Full-state based [old] -- what is mentioned in that email
	Full-state based [new] -- still needs to be dealt with

The full-state interface is missing, it is:

#include <netinet/in.h>

int setipv4sourcefilter(int s, struct in_addr interface,
                        struct in_addr group, uint32_t fmode,
                        uint32_t numsrc, struct in_addr *slist);
int getipv4sourcefilter(int s, struct in_addr interface,
                        struct in_addr group, uint32_t *fmode,
                        uint32_t *numsrc, struct in_addr *slist);

int setsourcefilter(int s, uint32_t interface,
                    struct sockaddr *group, socklen_t grouplen,
                    uint32_t fmode, uint_t numsrc,
                    struct sockaddr_storage *slist);
                    uint32_t *numsrc, struct in_addr *slist);
int getsourcefilter(int s, uint32_t interface,
                    struct sockaddr *group, socklen_t grouplen,
                    uint32_t fmode, uint_t *numsrc,
                    struct sockaddr_storage *slist);

Comment 5 Charles R. Anderson 2004-07-13 10:27:28 UTC
(In reply to comment #1, comment #4)
> sys/sockio.h should also be extended.
> On Mon, Jul 12, 2004 at 11:50:41PM -0000, cra at wpi dot edu wrote:
> > sockio.h ioctl interface is obsolete according to this:
> This does not say that the setsockopt interface is obsolete.
> It is not.

I did not say that the setsockopt interface is obsolete.  I said that the ioctl
interface is obsolete.  I was referring to sockios.h (I cannot find a sockio.h
anywhere) which has ioctl numbers in it, which you said in comment #1 needed to
be extended.  To my knowledge, it does not, as there are no new ioctls to implement.
Comment 6 Wesley W. Terpstra 2004-07-13 11:24:31 UTC
Subject: Re:  IP SSM multicast, IGMPv3, RFC3678 support missing

On Tue, Jul 13, 2004 at 10:27:30AM -0000, cra at wpi dot edu wrote:
> I did not say that the setsockopt interface is obsolete.  I said that the ioctl
> interface is obsolete.  I was referring to sockios.h (I cannot find a sockio.h
> anywhere) which has ioctl numbers in it, which you said in comment #1 needed to
> be extended.  To my knowledge, it does not, as there are no new ioctls to implement.

Ok, never mind then. =)

There is this old interface which maybe should be there for backwards
compatability... But, that's no big deal since Linux has simply never 
had it.

Comment 7 Charles R. Anderson 2004-07-13 19:55:24 UTC
Here is a tested, working patch with more of the implementation.  Everything
except the new advanced API functions and prototypes themselves should be there
now.  According to the Linux kernel folks, the libc advanced full state-based
API get/setipv4sourcefilter and get/setsourcefilter functions should be
implemented internally using get/setsockopt on IP_MSFILTER and MCAST_MSFILTER. 
Even without the advanced API, this patch will help a lot of people.

Please apply so we can finally have basic SSM support.  Thanks.
Comment 8 Charles R. Anderson 2004-07-13 19:57:09 UTC
Created attachment 132 [details]
Patch to implement basic API, start of advanced API
Comment 9 Ulrich Drepper 2004-07-23 04:40:39 UTC
The patch is not correct since it moves structures in the wrong headers.

I have started adding the definitions to headers in the current CVS sources. 
I'll get to writing the code for the interfaces in the not too distant future.
Comment 10 Ulrich Drepper 2004-08-06 05:00:47 UTC
I have added all the type and macro definitions and coded the four interface. 
The result is in CVS now.