mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
l2tp: Fix the connect status check in pppol2tp_getname
The sk->sk_state is bits flag, so need use bit operation check instead of value check. Signed-off-by: Gao Feng <[email protected]> Tested-by: Guillaume Nault <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
4c2f245496
commit
56cff471d0
1 changed files with 1 additions and 1 deletions
|
|
@ -856,7 +856,7 @@ static int pppol2tp_getname(struct socket *sock, struct sockaddr *uaddr,
|
|||
error = -ENOTCONN;
|
||||
if (sk == NULL)
|
||||
goto end;
|
||||
if (sk->sk_state != PPPOX_CONNECTED)
|
||||
if (!(sk->sk_state & PPPOX_CONNECTED))
|
||||
goto end;
|
||||
|
||||
error = -EBADF;
|
||||
|
|
|
|||
Loading…
Reference in a new issue