diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-10-15 09:08:29 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-10-26 12:26:49 -0400 |
commit | 54292d64e1b6cbe735852aaf59e56ef78dc15f82 (patch) | |
tree | 50a1e428bb10ae92e75f8aa380680f07e468ebaf /net/nfc | |
parent | e6904081dd2ff22b861d976810a55322b5aece82 (diff) |
NFC: Check for connection less sockets when looking for a service name
Connection less server sockets will be in BOUND state, not LISTEN.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp/llcp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c index dd2cc0e48a1d..ee01be17e21f 100644 --- 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, | |||
249 | 249 | ||
250 | pr_debug("llcp sock %p\n", tmp_sock); | 250 | pr_debug("llcp sock %p\n", tmp_sock); |
251 | 251 | ||
252 | if (tmp_sock->sk.sk_state != LLCP_LISTEN) | 252 | if (tmp_sock->sk.sk_type == SOCK_STREAM && |
253 | tmp_sock->sk.sk_state != LLCP_LISTEN) | ||
254 | continue; | ||
255 | |||
256 | if (tmp_sock->sk.sk_type == SOCK_DGRAM && | ||
257 | tmp_sock->sk.sk_state != LLCP_BOUND) | ||
253 | continue; | 258 | continue; |
254 | 259 | ||
255 | if (tmp_sock->service_name == NULL || | 260 | if (tmp_sock->service_name == NULL || |