Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98091
b: refs/heads/master
c: 1717699
h: refs/heads/master
i:
  98089: e4b654e
  98087: 1f1af6b
v: v3
  • Loading branch information
YOSHIFUJI Hideaki committed Jun 12, 2008
1 parent ad92992 commit c425e6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28d4488216645cd71402925cffde9528b0cfdb7e
refs/heads/master: 1717699cd5130009b7cd6756e883d8582c1fe706
8 changes: 4 additions & 4 deletions trunk/net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *))

/* RA packet may be delivered ONLY to IPPROTO_RAW socket */
if (sk->sk_type != SOCK_RAW || inet_sk(sk)->num != IPPROTO_RAW)
return -EINVAL;
return -ENOPROTOOPT;

new_ra = (sel>=0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL;

Expand Down Expand Up @@ -446,7 +446,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,

case IPV6_MULTICAST_HOPS:
if (sk->sk_type == SOCK_STREAM)
goto e_inval;
break;
if (optlen < sizeof(int))
goto e_inval;
if (val > 255 || val < -1)
Expand All @@ -466,7 +466,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,

case IPV6_MULTICAST_IF:
if (sk->sk_type == SOCK_STREAM)
goto e_inval;
break;
if (optlen < sizeof(int))
goto e_inval;

Expand Down Expand Up @@ -862,7 +862,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_protocol != IPPROTO_UDP &&
sk->sk_protocol != IPPROTO_UDPLITE &&
sk->sk_protocol != IPPROTO_TCP)
return -EINVAL;
return -ENOPROTOOPT;
if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN;
val = sk->sk_family;
Expand Down

0 comments on commit c425e6a

Please sign in to comment.