Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54292d64 authored by Samuel Ortiz's avatar Samuel Ortiz
Browse files

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: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent e6904081
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 ||