[IPV6]: Do not change protocol for UDPv6 sockets with pending sent data.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
This commit is contained in:
parent
36d926b94a
commit
9596cc826e
@ -164,9 +164,14 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
|
|||||||
if (sk->sk_type == SOCK_RAW)
|
if (sk->sk_type == SOCK_RAW)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (sk->sk_protocol != IPPROTO_UDP &&
|
if (sk->sk_protocol == IPPROTO_UDP ||
|
||||||
sk->sk_protocol != IPPROTO_UDPLITE &&
|
sk->sk_protocol == IPPROTO_UDPLITE) {
|
||||||
sk->sk_protocol != IPPROTO_TCP)
|
struct udp_sock *up = udp_sk(sk);
|
||||||
|
if (up->pending == AF_INET6) {
|
||||||
|
retv = -EBUSY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (sk->sk_protocol != IPPROTO_TCP)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (sk->sk_state != TCP_ESTABLISHED) {
|
if (sk->sk_state != TCP_ESTABLISHED) {
|
||||||
|
Loading…
Reference in New Issue
Block a user