mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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>
This commit is contained in:
parent
e6904081dd
commit
54292d64e1
@ -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 ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user