15.1 & 17.1: Fixup incorrect patch hunk

Needs to be in smp_proc_init not smp_proc_rand
All other branches checked to be correct

15.1: additionally use @syphyr's response backport due to lack of status field

Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
Tavi 2024-07-17 18:16:40 -04:00
parent 3400a35eb1
commit c250665b4f
No known key found for this signature in database
GPG Key ID: E599F62ECBAEAF2E
2 changed files with 7 additions and 9 deletions

View File

@ -15,12 +15,12 @@ Ignore-AOSP-First: security
Merged-In: I66b1f9a80060f48a604001829db8ea7c96c7b7f8
Change-Id: I66b1f9a80060f48a604001829db8ea7c96c7b7f8
---
stack/smp/smp_act.cc | 12 ++++++++++++
stack/smp/smp_act.cc | 10 ++++++++++
stack/smp/smp_int.h | 1 +
2 files changed, 13 insertions(+)
2 files changed, 11 insertions(+)
diff --git a/stack/smp/smp_act.cc b/stack/smp/smp_act.cc
index 7b6ae6f2c..db0617904 100644
index 7b6ae6f2c..a157b1faf 100644
--- a/stack/smp/smp_act.cc
+++ b/stack/smp/smp_act.cc
@@ -275,6 +275,7 @@ void smp_send_pair_rsp(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
@ -31,7 +31,7 @@ index 7b6ae6f2c..db0617904 100644
}
/*******************************************************************************
@@ -631,6 +632,17 @@ void smp_proc_rand(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
@@ -612,6 +613,15 @@ void smp_proc_init(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
return;
}
@ -40,9 +40,7 @@ index 7b6ae6f2c..db0617904 100644
+ !(p_cb->flags & SMP_PAIR_FLAGS_CMD_CONFIRM_SENT)) {
+ // in legacy pairing, the peer should send its rand after
+ // we send our confirm
+ tSMP_INT_DATA smp_int_data{};
+ smp_int_data.status = SMP_INVALID_PARAMETERS;
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data);
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
+ return;
+ }
+

View File

@ -20,7 +20,7 @@ Change-Id: I66b1f9a80060f48a604001829db8ea7c96c7b7f8
2 files changed, 13 insertions(+)
diff --git a/stack/smp/smp_act.cc b/stack/smp/smp_act.cc
index a18d8389b..cb8b16329 100755
index a18d8389b..ab9e9aa69 100755
--- a/stack/smp/smp_act.cc
+++ b/stack/smp/smp_act.cc
@@ -290,6 +290,7 @@ void smp_send_pair_rsp(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
@ -31,7 +31,7 @@ index a18d8389b..cb8b16329 100755
}
/*******************************************************************************
@@ -671,6 +672,17 @@ void smp_proc_rand(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
@@ -651,6 +652,17 @@ void smp_proc_init(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
return;
}