From a96fb49be3dd2031f722bf32af6ed7db965b60f7 Mon Sep 17 00:00:00 2001 From: Flavio Leitner Date: Fri, 24 Aug 2007 22:16:39 -0700 Subject: [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 Signed-off-by: David S. Miller --- net/ipv6/ipv6_sockglue.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net/ipv6/ipv6_sockglue.c') diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 761a910f4f97..6b038aa72e88 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -554,6 +554,10 @@ done: { struct ipv6_mreq mreq; + retv = -EPROTO; + if (inet_sk(sk)->is_icsk) + break; + retv = -EFAULT; if (copy_from_user(&mreq, optval, sizeof(struct ipv6_mreq))) break; -- cgit v1.2.1