Commit 46b66d70 authored by Xi Wang's avatar Xi Wang Committed by David S. Miller

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: default avatarXi Wang <xi.wang@gmail.com>
Acked-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c9ff979
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment