提交 54292d64 编写于 作者: S Samuel Ortiz

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: NSamuel Ortiz <sameo@linux.intel.com>
上级 e6904081
......@@ -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 ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册