btmgmt: Fix enable adding irk when turining privacy on
PATCH v2 1/1 btmgmt: Fix enable adding irk when turining privacy on
Unable to add the IRK in btmgmt when need to be updated. The option is enabled now.
--- tools/btmgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/btmgmt.c +1 -1
@@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { cmd_advertising, "Toggle LE advertising", }, {"bredr" ,"<on/off>" , cmd_bredr, "Toggle BR/EDR support", }, - { "privacy", "<on/off>", + { "privacy", "<on/off> [irk]", cmd_privacy, "Toggle privacy support" }, { "class", "<major> <minor>", cmd_class, "Set device major/minor class" },
Signature · 1 line
2.17.1
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=476815
---Test result---
Test Summary:
CheckPatch PASS 0.34 seconds GitLint PASS 0.13 seconds Prep - Setup ELL PASS 48.83 seconds Build - Prep PASS 0.11 seconds Build - Configure PASS 8.51 seconds Build - Make PASS 208.97 seconds Make Check PASS 9.35 seconds Make Dist PASS 12.80 seconds Make Dist - Configure PASS 5.25 seconds Make Dist - Make PASS 84.21 seconds Build w/ext ELL - Configure PASS 8.62 seconds Build w/ext ELL - Make PASS 198.03 seconds
Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint
##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL
##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build
##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree
##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree
##############################
Test: Make Check - PASS
Desc: Run 'make check'
##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball
##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball
##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball
##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration
##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration
---
Regards,
Linux Bluetooth
Hi Sathish,
Quoted 76 lines · On Tue, May 4, 2021 at 4:48 AM <[email protected]> wrote:
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=476815---Test result---
Test Summary:
CheckPatch PASS 0.34 seconds GitLint PASS 0.13 seconds Prep - Setup ELL PASS 48.83 seconds Build - Prep PASS 0.11 seconds Build - Configure PASS 8.51 seconds Build - Make PASS 208.97 seconds Make Check PASS 9.35 seconds Make Dist PASS 12.80 seconds Make Dist - Configure PASS 5.25 seconds Make Dist - Make PASS 84.21 seconds Build w/ext ELL - Configure PASS 8.62 seconds Build w/ext ELL - Make PASS 198.03 secondsDetails
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree##############################
Test: Make Check - PASS
Desc: Run 'make check'##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration
Quoted 3 lines
---
Regards,
Linux Bluetooth
Applied, thanks.
Signature · 1 line
Luiz Augusto von Dentz
Luiz Augusto von Dentz
maintainerHi Sathish,
Quoted 14 lines · Sathish Narasimman
Unable to add the IRK in btmgmt when need to be updated. The option is enabled now.
Signed-off-by Sathish Narasimman <[email protected]>--- tools/btmgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/btmgmt.c +0
-0
tools/btmgmt.c static const struct bt_shell_menu main_menu = { · line 5281
Quoted 6 lines
tools/btmgmt.c +1
-1@@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { cmd_advertising, "Toggle LE advertising", }, {"bredr" ,"<on/off>" , cmd_bredr, "Toggle BR/EDR support", }, - { "privacy", "<on/off>", + { "privacy", "<on/off> [irk]", cmd_privacy, "Toggle privacy support" },
I wonder why you didn't incorporate in the first parameter though given that things like privacy off [irk] makes no send, or perhaps have a dedicated command for setting the irk so it would persist between privacy on/off.
Quoted 5 lines
tools/btmgmt.c +0
-1{"class" ,"<major> <minor>" , cmd_class, "Set device major/minor class" }, --2.17.1
Signature · 1 line
Luiz Augusto von Dentz
Marcel Holtmann
maintainerHi Luiz,
Quoted 8 lines
Quoted 8 lines
Unable to add the IRK in btmgmt when need to be updated. The option is enabled now.
Signed-off-by Sathish Narasimman <[email protected]>---
tools/btmgmt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
tools/btmgmt.c static const struct bt_shell_menu main_menu = { · line 5281
Quoted 11 lines
tools/btmgmt.c +1
-1@@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { cmd_advertising, "Toggle LE advertising", }, {"bredr" ,"<on/off>" , cmd_bredr, "Toggle BR/EDR support", }, - { "privacy", "<on/off>", + { "privacy", "<on/off> [irk]", cmd_privacy, "Toggle privacy support" },I wonder why you didn't incorporate in the first parameter though given that things like privacy off [irk] makes no send, or perhaps have a dedicated command for setting the irk so it would persist between privacy on/off.
that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use /dev/urandom in case it is not provided.
Regards
Marcel
Luiz Augusto von Dentz
maintainerHi Marcel,
Quoted 28 lines · Marcel Holtmann
Hi Luiz,
Quoted 8 lines
Quoted 8 lines
Unable to add the IRK in btmgmt when need to be updated. The option is enabled now.
Signed-off-by Sathish Narasimman <[email protected]>---
tools/btmgmt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
tools/btmgmt.c static const struct bt_shell_menu main_menu = { · line 5281
Quoted 11 lines
tools/btmgmt.c +1
-1@@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { cmd_advertising, "Toggle LE advertising", }, {"bredr" ,"<on/off>" , cmd_bredr, "Toggle BR/EDR support", }, - { "privacy", "<on/off>", + { "privacy", "<on/off> [irk]", cmd_privacy, "Toggle privacy support" },I wonder why you didn't incorporate in the first parameter though given that things like privacy off [irk] makes no send, or perhaps have a dedicated command for setting the irk so it would persist between privacy on/off.
Quoted 1 line
that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use
/dev/urandomin case it is not provided.
Just to be clear I was suggesting to use a dedicated command for setting an irk:
Quoted 1 line
irk <value>
That way it is persisted, that way the tool remembers what was the last set irk in case privacy needs to be toggled for some reason.
Signature · 1 line
Luiz Augusto von Dentz
Marcel Holtmann
maintainerHi Luiz,
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 13 lines
Unable to add the IRK in btmgmt when need to be updated. The option is enabled now.
Signed-off-by Sathish Narasimman <[email protected]>---
tools/btmgmt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)tools/btmgmt.c +0
-0tools/btmgmt.c static const struct bt_shell_menu main_menu = { · line 5281
Quoted 6 lines
tools/btmgmt.c +1
-1@@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { cmd_advertising, "Toggle LE advertising", }, {"bredr" ,"<on/off>" , cmd_bredr, "Toggle BR/EDR support", }, - { "privacy", "<on/off>", + { "privacy", "<on/off> [irk]", cmd_privacy, "Toggle privacy support" },I wonder why you didn't incorporate in the first parameter though given that things like privacy off [irk] makes no send, or perhaps have a dedicated command for setting the irk so it would persist between privacy on/off.
Quoted 8 lines
Quoted 1 line
that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use
/dev/urandomin case it is not provided.Just to be clear I was suggesting to use a dedicated command for setting an irk:
Quoted 1 line
irk <value>
That way it is persisted, that way the tool remembers what was the last set irk in case privacy needs to be toggled for some reason.
but btmgmt has no storage facility. It can’t remember its own name if its life depended on it ;)
Regards
Marcel