mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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>
This commit is contained in:
parent
6c9ff979d1
commit
46b66d7077
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user