Commit 6d2cd978 authored by Samuel Ortiz's avatar Samuel Ortiz

NFC: llcp: Terminate connection when receiving a DISC on (0,0)

According to the LLCP specs, we must terminate the LLCP link when receiving
a DISC with both ssap and dsap set to 0.
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent c470e319
...@@ -1106,6 +1106,12 @@ static void nfc_llcp_recv_disc(struct nfc_llcp_local *local, ...@@ -1106,6 +1106,12 @@ static void nfc_llcp_recv_disc(struct nfc_llcp_local *local,
dsap = nfc_llcp_dsap(skb); dsap = nfc_llcp_dsap(skb);
ssap = nfc_llcp_ssap(skb); ssap = nfc_llcp_ssap(skb);
if ((dsap == 0) && (ssap == 0)) {
pr_debug("Connection termination");
nfc_dep_link_down(local->dev);
return;
}
llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); llcp_sock = nfc_llcp_sock_get(local, dsap, ssap);
if (llcp_sock == NULL) { if (llcp_sock == NULL) {
nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment