* [PATCH] Bluetooth: ISO: Fix handling os listen for unicast
@ 2023-08-28 20:03 Luiz Augusto von Dentz
2023-08-28 20:37 ` bluez.test.bot
2023-09-05 18:01 ` [PATCH] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-08-28 20:03 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
iso_listen_cis shall only return -EADDRINUSE if the listening socket has
the destination set to BDADDR_ANY otherwise if the destination is set to
a specific address it is for broadcast which shall be ignored.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/iso.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 16da946f5881..71248163ce9a 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -502,7 +502,7 @@ static void iso_recv_frame(struct iso_conn *conn, struct sk_buff *skb)
}
/* -------- Socket interface ---------- */
-static struct sock *__iso_get_sock_listen_by_addr(bdaddr_t *ba)
+static struct sock *__iso_get_sock_listen_by_addr(bdaddr_t *src, bdaddr_t *dst)
{
struct sock *sk;
@@ -510,7 +510,10 @@ static struct sock *__iso_get_sock_listen_by_addr(bdaddr_t *ba)
if (sk->sk_state != BT_LISTEN)
continue;
- if (!bacmp(&iso_pi(sk)->src, ba))
+ if (bacmp(&iso_pi(sk)->dst, dst))
+ continue;
+
+ if (!bacmp(&iso_pi(sk)->src, src))
return sk;
}
@@ -952,7 +955,7 @@ static int iso_listen_cis(struct sock *sk)
write_lock(&iso_sk_list.lock);
- if (__iso_get_sock_listen_by_addr(&iso_pi(sk)->src))
+ if (__iso_get_sock_listen_by_addr(&iso_pi(sk)->src, &iso_pi(sk)->dst))
err = -EADDRINUSE;
write_unlock(&iso_sk_list.lock);
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: ISO: Fix handling os listen for unicast
2023-08-28 20:03 [PATCH] Bluetooth: ISO: Fix handling os listen for unicast Luiz Augusto von Dentz
@ 2023-08-28 20:37 ` bluez.test.bot
2023-09-05 18:01 ` [PATCH] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-08-28 20:37 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=780042
---Test result---
Test Summary:
CheckPatch PASS 0.80 seconds
GitLint PASS 0.36 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 34.16 seconds
CheckAllWarning PASS 37.18 seconds
CheckSparse PASS 43.02 seconds
CheckSmatch PASS 114.56 seconds
BuildKernel32 PASS 32.69 seconds
TestRunnerSetup PASS 498.36 seconds
TestRunner_l2cap-tester PASS 29.22 seconds
TestRunner_iso-tester PASS 52.48 seconds
TestRunner_bnep-tester PASS 11.28 seconds
TestRunner_mgmt-tester PASS 227.01 seconds
TestRunner_rfcomm-tester PASS 17.22 seconds
TestRunner_sco-tester PASS 21.43 seconds
TestRunner_ioctl-tester PASS 19.12 seconds
TestRunner_mesh-tester PASS 14.24 seconds
TestRunner_smp-tester PASS 15.30 seconds
TestRunner_userchan-tester PASS 12.04 seconds
IncrementalBuild PASS 31.21 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: ISO: Fix handling os listen for unicast
2023-08-28 20:03 [PATCH] Bluetooth: ISO: Fix handling os listen for unicast Luiz Augusto von Dentz
2023-08-28 20:37 ` bluez.test.bot
@ 2023-09-05 18:01 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-09-05 18:01 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 28 Aug 2023 13:03:45 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> iso_listen_cis shall only return -EADDRINUSE if the listening socket has
> the destination set to BDADDR_ANY otherwise if the destination is set to
> a specific address it is for broadcast which shall be ignored.
>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> [...]
Here is the summary with links:
- Bluetooth: ISO: Fix handling os listen for unicast
https://git.kernel.org/bluetooth/bluetooth-next/c/2595dd981e74
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-05 20:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-28 20:03 [PATCH] Bluetooth: ISO: Fix handling os listen for unicast Luiz Augusto von Dentz
2023-08-28 20:37 ` bluez.test.bot
2023-09-05 18:01 ` [PATCH] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).