diff options
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index bf2a686aa13d..0a18fecb93d1 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -239,7 +239,9 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
239 | struct sk_buff *pktopt; | 239 | struct sk_buff *pktopt; |
240 | 240 | ||
241 | if (sk->sk_protocol != IPPROTO_UDP && | 241 | if (sk->sk_protocol != IPPROTO_UDP && |
242 | #ifdef CONFIG_IP_UDPLITE | ||
242 | sk->sk_protocol != IPPROTO_UDPLITE && | 243 | sk->sk_protocol != IPPROTO_UDPLITE && |
244 | #endif | ||
243 | sk->sk_protocol != IPPROTO_TCP) | 245 | sk->sk_protocol != IPPROTO_TCP) |
244 | break; | 246 | break; |
245 | 247 | ||
@@ -279,7 +281,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
279 | } else { | 281 | } else { |
280 | struct proto *prot = &udp_prot; | 282 | struct proto *prot = &udp_prot; |
281 | 283 | ||
282 | if (sk->sk_protocol == IPPROTO_UDPLITE) | 284 | if (IS_PROTO_UDPLITE(sk->sk_protocol)) |
283 | prot = &udplite_prot; | 285 | prot = &udplite_prot; |
284 | local_bh_disable(); | 286 | local_bh_disable(); |
285 | sock_prot_inuse_add(sk->sk_prot, -1); | 287 | sock_prot_inuse_add(sk->sk_prot, -1); |
@@ -844,7 +846,9 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
844 | switch (optname) { | 846 | switch (optname) { |
845 | case IPV6_ADDRFORM: | 847 | case IPV6_ADDRFORM: |
846 | if (sk->sk_protocol != IPPROTO_UDP && | 848 | if (sk->sk_protocol != IPPROTO_UDP && |
849 | #ifdef CONFIG_IP_UDPLITE | ||
847 | sk->sk_protocol != IPPROTO_UDPLITE && | 850 | sk->sk_protocol != IPPROTO_UDPLITE && |
851 | #endif | ||
848 | sk->sk_protocol != IPPROTO_TCP) | 852 | sk->sk_protocol != IPPROTO_TCP) |
849 | return -EINVAL; | 853 | return -EINVAL; |
850 | if (sk->sk_state != TCP_ESTABLISHED) | 854 | if (sk->sk_state != TCP_ESTABLISHED) |