projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c2f245
)
l2tp: Fix the connect status check in pppol2tp_getname
author
Gao Feng
<fgao@ikuai8.com>
Fri, 19 Aug 2016 05:36:23 +0000
(13:36 +0800)
committer
David S. Miller
<davem@davemloft.net>
Sat, 20 Aug 2016 00:55:43 +0000
(17:55 -0700)
The sk->sk_state is bits flag, so need use bit operation check
instead of value check.
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Tested-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_ppp.c
patch
|
blob
|
history
diff --git
a/net/l2tp/l2tp_ppp.c
b/net/l2tp/l2tp_ppp.c
index
d9560aa
..
232cb92
100644
(file)
--- a/
net/l2tp/l2tp_ppp.c
+++ b/
net/l2tp/l2tp_ppp.c
@@
-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;