summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2012-08-26 18:37:07 +0200
committerDavid S. Miller <davem@davemloft.net>2012-08-31 21:55:37 +0200
commit46b66d7077b89fb4917ceef19b3f7dd86055c94a (patch)
tree27a0cd495e6fd8e69a924af4cffe7cb4d6f62fff /net
parenttcp: Increase timeout for SYN segments (diff)
downloadlinux-46b66d7077b89fb4917ceef19b3f7dd86055c94a.tar.xz
linux-46b66d7077b89fb4917ceef19b3f7dd86055c94a.zip
decnet: fix shutdown parameter checking
The allowed value of "how" is SHUT_RD/SHUT_WR/SHUT_RDWR (0/1/2), rather than SHUTDOWN_MASK (3). Signed-off-by: Xi Wang <xi.wang@gmail.com> Acked-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/decnet/af_decnet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 2ba1a2814c24..307c322d53bb 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1313,10 +1313,10 @@ static int dn_shutdown(struct socket *sock, int how)
if (scp->state == DN_O)
goto out;
- if (how != SHUTDOWN_MASK)
+ if (how != SHUT_RDWR)
goto out;
- sk->sk_shutdown = how;
+ sk->sk_shutdown = SHUTDOWN_MASK;
dn_destroy_sock(sk);
err = 0;