summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipv6_sockglue.c
diff options
context:
space:
mode:
authorFlavio Leitner <fleitner@redhat.com>2007-08-24 22:16:39 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-26 18:35:35 -0700
commita96fb49be3dd2031f722bf32af6ed7db965b60f7 (patch)
tree3c02106c65a3013990007d9bdf2708616bc9ba6e /net/ipv6/ipv6_sockglue.c
parent36d98d3edce12c8f9ffd33f8f5d23ce728380925 (diff)
downloadblackbird-op-linux-a96fb49be3dd2031f722bf32af6ed7db965b60f7.tar.gz
blackbird-op-linux-a96fb49be3dd2031f722bf32af6ed7db965b60f7.zip
[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@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r--net/ipv6/ipv6_sockglue.c4
1 files changed, 4 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud