projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e690408
)
NFC: Check for connection less sockets when looking for a service name
author
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 15 Oct 2012 13:08:29 +0000
(15:08 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 26 Oct 2012 16:26:49 +0000
(18:26 +0200)
Connection less server sockets will be in BOUND state, not LISTEN.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp/llcp.c
patch
|
blob
|
blame
|
history
diff --git
a/net/nfc/llcp/llcp.c
b/net/nfc/llcp/llcp.c
index dd2cc0e48a1d40ce490ecd05e99e3714c5f59499..ee01be17e21f708e80d5904de74fcb910c6963a1 100644
(file)
--- a/
net/nfc/llcp/llcp.c
+++ b/
net/nfc/llcp/llcp.c
@@
-249,7
+249,12
@@
struct nfc_llcp_sock *nfc_llcp_sock_from_sn(struct nfc_llcp_local *local,
pr_debug("llcp sock %p\n", tmp_sock);
- if (tmp_sock->sk.sk_state != LLCP_LISTEN)
+ if (tmp_sock->sk.sk_type == SOCK_STREAM &&
+ tmp_sock->sk.sk_state != LLCP_LISTEN)
+ continue;
+
+ if (tmp_sock->sk.sk_type == SOCK_DGRAM &&
+ tmp_sock->sk.sk_state != LLCP_BOUND)
continue;
if (tmp_sock->service_name == NULL ||