[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070824.221654.03105704.davem@davemloft.net>
Date: Fri, 24 Aug 2007 22:16:54 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: fleitner@...hat.com
Cc: netdev@...r.kernel.org, dlstevens@...ibm.com,
acme@...stprotocols.net
Subject: Re: [PATCH] [NET]: fix multicast list when cloning sockets
From: Flavio Leitner <fleitner@...hat.com>
Date: Tue, 31 Jul 2007 15:29:40 -0300
> On Tue, Jul 31, 2007 at 12:00:41AM -0300, Arnaldo Carvalho de Melo wrote:
> > On 7/30/07, David Miller <davem@...emloft.net> wrote:
> > > Allowing non-datagram sockets to end up with a non-NULL inet->mc_list
> > > in the first place is a bug.
> > >
> > > Multicast subscriptions cannot even be used with TCP and DCCP, which
> > > are the only two users of these connection oriented socket functions.
> > >
> > > The first thing that TCP and DCCP do, in fact, for input packet
> > > processing is drop the packet if it is not unicast.
> > >
> > > Therefore the fix really is for the inet layer to reject multicast
> > > subscription requests on sockets for which that absolutely does not
> > > make sense. There is no reason these functions in
> > > inet_connection_sock.c should need to be mindful of multicast
> > > state. :-)
> >
> > Well, we can add a BUG_ON there then 8)
> >
> > Flavio, take a look at do_ip_setsockopt in net/ipv4/ip_sockglue.c, in
> > the IP_{ADD,DROP}_MEMBERSHIP labels.
> >
> > Don't forget IPV6 (net/ipv6/ipv6_sockglue.c)
>
> yes, right. What about the one below?
>
> [NET]: Fix IP_ADD/DROP_MEMBERSHIP to handle only connectionless
>
> Fix IP[V6]_ADD_MEMBERSHIP and IP[V6]_DROP_MEMBERSHIP to
> return -EPROTO for connection oriented sockets.
>
> Signed-off-by: Flavio Leitner <fleitner@...hat.com>
This looks great, patch applied.
Thanks!
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists