diff options
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 3bbfdff698d2..5eea6fa506e5 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -127,9 +127,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
127 | struct sk_buff *pktopt; | 127 | struct sk_buff *pktopt; |
128 | 128 | ||
129 | if (sk->sk_protocol != IPPROTO_UDP && | 129 | if (sk->sk_protocol != IPPROTO_UDP && |
130 | #ifdef CONFIG_IP_UDPLITE | ||
131 | sk->sk_protocol != IPPROTO_UDPLITE && | 130 | sk->sk_protocol != IPPROTO_UDPLITE && |
132 | #endif | ||
133 | sk->sk_protocol != IPPROTO_TCP) | 131 | sk->sk_protocol != IPPROTO_TCP) |
134 | break; | 132 | break; |
135 | 133 | ||
@@ -169,7 +167,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
169 | } else { | 167 | } else { |
170 | struct proto *prot = &udp_prot; | 168 | struct proto *prot = &udp_prot; |
171 | 169 | ||
172 | if (IS_PROTO_UDPLITE(sk->sk_protocol)) | 170 | if (sk->sk_protocol == IPPROTO_UDPLITE) |
173 | prot = &udplite_prot; | 171 | prot = &udplite_prot; |
174 | local_bh_disable(); | 172 | local_bh_disable(); |
175 | sock_prot_inuse_add(sk->sk_prot, -1); | 173 | sock_prot_inuse_add(sk->sk_prot, -1); |
@@ -734,9 +732,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
734 | switch (optname) { | 732 | switch (optname) { |
735 | case IPV6_ADDRFORM: | 733 | case IPV6_ADDRFORM: |
736 | if (sk->sk_protocol != IPPROTO_UDP && | 734 | if (sk->sk_protocol != IPPROTO_UDP && |
737 | #ifdef CONFIG_IP_UDPLITE | ||
738 | sk->sk_protocol != IPPROTO_UDPLITE && | 735 | sk->sk_protocol != IPPROTO_UDPLITE && |
739 | #endif | ||
740 | sk->sk_protocol != IPPROTO_TCP) | 736 | sk->sk_protocol != IPPROTO_TCP) |
741 | return -EINVAL; | 737 | return -EINVAL; |
742 | if (sk->sk_state != TCP_ESTABLISHED) | 738 | if (sk->sk_state != TCP_ESTABLISHED) |