Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reuse a commissionee device if it has the wrong device id. #19141

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Found during investigation of
#15409 but there
may be more problems left in that issue.

If we get into EstablishPASEConnection and find an existing
commissionee for the peer address (which is easy for BLE, where the
peer address is basically a singleton), but the device id does not
match the passed-in one, we should not reuse that device. If we try
to, Commission will fail to find the commissionee device by device id
and fail out.

Problem

See above.

Change overview

See above.

Testing

Tested that the steps from #15409 (comment) no longer result in an error for the second commissioning attempt.

Found during investigation of
project-chip#15409 but there
may be more problems left in that issue.

If we get into EstablishPASEConnection and find an existing
commissionee for the peer address (which is easy for BLE, where the
peer address is basically a singleton), but the device id does not
match the passed-in one, we should not reuse that device.  If we try
to, Commission will fail to find the commissionee device by device id
and fail out.
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

PR #19141: Size comparison from 1868a88 to 224ca1c

Increases (1 build for linux)
platform target config section 1868a88 224ca1c change % change
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9345492 9345524 32 0.0
.text 7372676 7372708 32 0.0
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 1868a88 224ca1c change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 648467 648467 0 0.0
(read/write) 158988 158988 0 0.0
.bss 74668 74668 0 0.0
.data 3404 3404 0 0.0
.rodata 84531 84531 0 0.0
.text 563704 563704 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 615347 615347 0 0.0
(read/write) 158160 158160 0 0.0
.bss 73900 73900 0 0.0
.data 3344 3344 0 0.0
.rodata 73915 73915 0 0.0
.text 541200 541200 0 0.0
lock-ftd LP_CC2652R7 (read only) 680623 680623 0 0.0
(read/write) 162288 162288 0 0.0
.bss 72692 72692 0 0.0
.data 3268 3268 0 0.0
.rodata 96687 96687 0 0.0
.text 583456 583456 0 0.0
lock-mtd LP_CC2652R7 (read only) 630023 630023 0 0.0
(read/write) 145812 145812 0 0.0
.bss 68428 68428 0 0.0
.data 3268 3268 0 0.0
.rodata 96567 96567 0 0.0
.text 532968 532968 0 0.0
pump-app LP_CC2652R7 (read only) 663647 663647 0 0.0
(read/write) 180176 180176 0 0.0
.bss 72836 72836 0 0.0
.data 3300 3300 0 0.0
.rodata 85703 85703 0 0.0
.text 577460 577460 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654975 654975 0 0.0
(read/write) 188960 188960 0 0.0
.bss 72948 72948 0 0.0
.data 3264 3264 0 0.0
.rodata 83895 83895 0 0.0
.text 570596 570596 0 0.0
shell LP_CC2652R7 (read only) 641482 641482 0 0.0
(read/write) 154544 154544 0 0.0
.bss 77020 77020 0 0.0
.data 3408 3408 0 0.0
.rodata 81522 81522 0 0.0
.text 559724 559724 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 601886 601886 0 0.0
.app_xip_area 460912 460912 0 0.0
.bss 83912 83912 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 597986 597986 0 0.0
.app_xip_area 456884 456884 0 0.0
.bss 84072 84072 0 0.0
.data 712 712 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 596634 596634 0 0.0
.app_xip_area 456656 456656 0 0.0
.bss 83044 83044 0 0.0
.data 620 620 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 915840 915840 0 0.0
(read/write) 133280 133280 0 0.0
.bss 131176 131176 0 0.0
.data 2100 2100 0 0.0
.text 915832 915832 0 0.0
BRD4161A+rpc (read only) 950068 950068 0 0.0
(read/write) 149968 149968 0 0.0
.bss 147664 147664 0 0.0
.data 2304 2304 0 0.0
.text 950060 950060 0 0.0
BRD4161A+rs911x (read only) 787908 787908 0 0.0
(read/write) 129496 129496 0 0.0
.bss 127396 127396 0 0.0
.data 2100 2100 0 0.0
.text 787900 787900 0 0.0
lock-app BRD4161A+wf200 (read only) 955220 955220 0 0.0
(read/write) 128332 128332 0 0.0
.bss 126260 126260 0 0.0
.data 2072 2072 0 0.0
.text 955212 955212 0 0.0
window-app BRD4161A (read only) 900760 900760 0 0.0
(read/write) 133344 133344 0 0.0
.bss 131248 131248 0 0.0
.data 2096 2096 0 0.0
.text 900752 900752 0 0.0
esp32 all-clusters-app c3devkit (read only) 1005296 1005296 0 0.0
(read/write) 1480178 1480178 0 0.0
.dram0.bss 69232 69232 0 0.0
.dram0.data 14656 14656 0 0.0
.flash.rodata 210864 210864 0 0.0
.flash.text 1005296 1005296 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1060475 1060475 0 0.0
(read/write) 482380 482380 0 0.0
.dram0.bss 74752 74752 0 0.0
.dram0.data 34208 34208 0 0.0
.flash.rodata 241424 241424 0 0.0
.flash.text 1055091 1055091 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 657796 657796 0 0.0
.bss 69768 69768 0 0.0
.data 2020 2020 0 0.0
.text 580208 580208 0 0.0
lock k32w061+release (read/write) 716812 716812 0 0.0
.bss 70192 70192 0 0.0
.data 1988 1988 0 0.0
.text 638832 638832 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9345492 9345524 32 0.0
(read/write) 662961 662961 0 0.0
.bss 42305 42305 0 0.0
.data 1176 1176 0 0.0
.data.rel.ro 600832 600832 0 0.0
.dynamic 528 528 0 0.0
.got 14824 14824 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 458652 458652 0 0.0
.text 7372676 7372708 32 0.0
thermostat-no-ble arm64 (read only) 2366668 2366668 0 0.0
(read/write) 177601 177601 0 0.0
.bss 87969 87969 0 0.0
.data 1528 1528 0 0.0
.data.rel.ro 80288 80288 0 0.0
.dynamic 528 528 0 0.0
.got 4800 4800 0 0.0
.init 24 24 0 0.0
.init_array 384 384 0 0.0
.rodata 148828 148828 0 0.0
.text 1988064 1988064 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2425560 2425560 0 0.0
.bss 202652 202652 0 0.0
.data 5880 5880 0 0.0
.text 1388204 1388204 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1187763 1187763 0 0.0
bss 141297 141297 0 0.0
rodata 152892 152892 0 0.0
text 814712 814712 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1136547 1136547 0 0.0
bss 140526 140526 0 0.0
rodata 129460 129460 0 0.0
text 787756 787756 0 0.0
p6 all-clusters-app default (read/write) 2541776 2541776 0 0.0
.bss 137192 137192 0 0.0
.data 2808 2808 0 0.0
.text 1500040 1500040 0 0.0
all-clusters-minimal-app default (read/write) 2487744 2487744 0 0.0
.bss 136416 136416 0 0.0
.data 2752 2752 0 0.0
.text 1446008 1446008 0 0.0
light-app default (read/write) 2422144 2422144 0 0.0
.bss 129520 129520 0 0.0
.data 2608 2608 0 0.0
.text 1380408 1380408 0 0.0
lock-app default (read/write) 2440200 2440200 0 0.0
.bss 129336 129336 0 0.0
.data 2576 2576 0 0.0
.text 1398464 1398464 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 780760 780760 0 0.0
bss 70584 70584 0 0.0
noinit 40416 40416 0 0.0
text 552132 552132 0 0.0
lighting-app tlsr9518adk80d (read/write) 800804 800804 0 0.0
bss 70844 70844 0 0.0
noinit 40416 40416 0 0.0
text 568874 568874 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit 2d1f8a1 into project-chip:master Jun 6, 2022
@bzbarsky-apple bzbarsky-apple deleted the fix-commissionee-reuse branch June 6, 2022 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants