Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64533
b: refs/heads/master
c: a96fb49
h: refs/heads/master
i:
  64531: 5e69445
v: v3
  • Loading branch information
Flavio Leitner authored and David S. Miller committed Aug 27, 2007
1 parent 3f4fdb8 commit c2a44a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36d98d3edce12c8f9ffd33f8f5d23ce728380925
refs/heads/master: a96fb49be3dd2031f722bf32af6ed7db965b60f7
4 changes: 4 additions & 0 deletions trunk/net/ipv4/ip_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,10 @@ static int do_ip_setsockopt(struct sock *sk, int level,
{
struct ip_mreqn mreq;

err = -EPROTO;
if (inet_sk(sk)->is_icsk)
break;

if (optlen < sizeof(struct ip_mreq))
goto e_inval;
err = -EFAULT;
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
{
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;
Expand Down

0 comments on commit c2a44a0

Please sign in to comment.