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

Expire associated secure sessions when a fabric is deleted #9571

Merged
merged 8 commits into from
Sep 13, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

The controller is able to send commands to the device after its fabric has been removed.

Change overview

The secure session on which the remove fabric command was received was not being torn down. This PR marks all secure sessions associated with the fabric as expired.

Testing

Added a new test to test the RemoveFabric cluster command.
Performed manual testing to ensure that commands sent after removing the fabric are dropped, as the session is no longer valid.

@todo
Copy link

todo bot commented Sep 13, 2021

#9642

// TODO: https://github.com/project-chip/connectedhomeip/issues/9642
ec->SetDelegate(&gFabricCleanupExchangeDelegate);
}
else
{
ec->GetExchangeMgr()->GetSessionMgr()->ExpireAllPairingsForFabric(fabricBeingRemoved);
}
}
return true;
}


This comment was generated by todo based on a TODO comment in ceee4f3 in #9571. cc @pan-apple.

@pan-apple
Copy link
Contributor Author

rebased

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from bc2d74b

File Section File VM
chip-qpg6100-lighting-example.out .text 1696 1696
chip-qpg6100-lighting-example.out .bss 0 32
chip-qpg6100-lighting-example.out .data 4 4
chip-qpg6100-lighting-example.out .heap 0 -32
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,23620
.debug_loc,0,5407
.debug_line,0,3648
.text,1696,1696
.debug_ranges,0,1040
.strtab,0,600
.debug_frame,0,396
.debug_abbrev,0,361
.symtab,0,320
.debug_str,0,116
.debug_aranges,0,104
.bss,32,0
.data,4,4
.heap,-32,0
[ELF Program Headers],0,-32
[Unmapped],0,-1664

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@github-actions
Copy link

Size increase report for "esp32-example-build" from bc2d74b

File Section File VM
chip-ipv6only-app.elf .flash.text 172 172
chip-bridge-app.elf .flash.text 1556 1556
chip-bridge-app.elf .flash.rodata 152 152
chip-bridge-app.elf .dram0.bss 0 32
chip-bridge-app.elf .dram0.data 8 8
chip-shell.elf .flash.text 20 20
chip-temperature-measurement-app.elf .flash.text 1432 1432
chip-temperature-measurement-app.elf .flash.rodata 152 152
chip-temperature-measurement-app.elf .dram0.bss 0 32
chip-temperature-measurement-app.elf .dram0.data 8 8
chip-all-clusters-app.elf .flash.text 1396 1396
chip-all-clusters-app.elf .flash.rodata 168 168
chip-all-clusters-app.elf .dram0.bss 0 32
chip-lock-app.elf .flash.text 1520 1520
chip-lock-app.elf .flash.rodata 152 152
chip-lock-app.elf .dram0.bss 0 32
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize
[Unmapped],0,3924
.flash.text,172,172

Comparing ./master_artifact/chip-bridge-app.elf and ./pull_artifact/chip-bridge-app.elf:

sections,vmsize,filesize
.debug_info,0,23692
.debug_line,0,7222
.debug_loc,0,4863
.flash.text,1556,1556
.debug_ranges,0,1296
.strtab,0,600
.debug_frame,0,312
.debug_abbrev,0,257
.flash.rodata,152,152
.debug_str,0,122
.symtab,0,112
.debug_aranges,0,104
.xt.prop._ZN4chip9Transport15PeerConnectionsILj16ELNS_4Time6SourceE0EE31FindPeerConnectionStateByFabricEh,0,84
.dram0.bss,32,0
.dram0.data,8,8
.xt.prop._ZN4chip8Encoding22PacketBufferWriterBaseINS0_12LittleEndian12BufferWriterEEC2EONS_6System18PacketBufferHandleE,0,-36
.xt.prop._ZNK4chip8Encoding12BufferWriter3FitEv,0,-36
[ELF Section Headers],0,-80
.shstrtab,0,-200
[Unmapped],0,-1716

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,2537
.debug_line,0,719
.debug_str,0,549
.debug_loc,0,510
.debug_ranges,0,336
.debug_frame,0,48
.flash.text,20,20
.debug_abbrev,0,17
.debug_aranges,0,16
[Unmapped],0,-20

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.debug_info,0,23211
.debug_line,0,7096
.debug_loc,0,4936
.flash.text,1432,1432
.debug_ranges,0,1296
.strtab,0,600
.debug_frame,0,312
.debug_abbrev,0,257
.flash.rodata,152,152
.debug_str,0,124
.symtab,0,112
.debug_aranges,0,104
.xt.prop._ZN4chip9Transport15PeerConnectionsILj16ELNS_4Time6SourceE0EE31FindPeerConnectionStateByFabricEh,0,84
.dram0.bss,32,0
.dram0.data,8,8
.xt.prop._ZN4chip8Encoding22PacketBufferWriterBaseINS0_12LittleEndian12BufferWriterEEC2EONS_6System18PacketBufferHandleE,0,-36
.xt.prop._ZNK4chip8Encoding12BufferWriter3FitEv,0,-36
[ELF Section Headers],0,-80
.shstrtab,0,-200
[Unmapped],0,-1592

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,19117
.debug_line,0,5079
.debug_loc,0,3304
.flash.text,1396,1396
.debug_ranges,0,1312
.strtab,0,600
.debug_frame,0,412
.debug_abbrev,0,203
.flash.rodata,168,168
.symtab,0,144
.debug_aranges,0,104
.dram0.bss,32,0
.dram0.data,0,8
.debug_str,0,4
.riscv.attributes,0,1
[Unmapped],0,-1572

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize
.debug_info,0,18312
.debug_line,0,7174
.debug_loc,0,4543
[Unmapped],0,2424
.flash.text,1520,1520
.debug_ranges,0,1296
.strtab,0,600
.debug_frame,0,312
.debug_abbrev,0,209
.flash.rodata,152,152
.symtab,0,112
.debug_aranges,0,104
.xt.prop._ZN4chip9Transport15PeerConnectionsILj16ELNS_4Time6SourceE0EE31FindPeerConnectionStateByFabricEh,0,84
.dram0.bss,32,0
[1 Others],0,2
.xt.lit._ZNK4chip4SpanIhE7SubSpanEjj,0,-8
.xt.prop._ZNK4chip4SpanIhE7SubSpanEjj,0,-12
.xt.prop._ZN4chip8Encoding22PacketBufferWriterBaseINS0_12LittleEndian12BufferWriterEEC2EONS_6System18PacketBufferHandleE,0,-36
.xt.prop._ZNK4chip8Encoding12BufferWriter3FitEv,0,-36
[ELF Section Headers],0,-80
.shstrtab,0,-200


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from bc2d74b

File Section File VM
chip-lock.elf text 1624 1624
chip-lock.elf rodata 216 220
chip-lock.elf bss 0 32
chip-lock.elf datas 4 4
chip-lock.elf devices 4 4
chip-lock.elf device_handles -8 -8
chip-shell.elf text 12 12
chip-shell.elf device_handles 4 4
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,23143
.debug_loc,0,5588
.debug_line,0,3692
text,1624,1624
.debug_ranges,0,1000
.strtab,0,600
.debug_frame,0,396
.debug_abbrev,0,361
.symtab,0,336
rodata,220,216
.debug_str,0,116
.debug_aranges,0,104
bss,32,0
datas,4,4
devices,4,4
device_handles,-8,-8

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,2760
.debug_loc,0,847
.debug_str,0,549
.debug_line,0,417
.debug_ranges,0,304
.debug_frame,0,72
.debug_abbrev,0,27
.debug_aranges,0,16
text,12,12
device_handles,4,4


@bzbarsky-apple bzbarsky-apple merged commit 692b86c into project-chip:master Sep 13, 2021
@pan-apple pan-apple deleted the remove-fabric branch September 13, 2021 22:37
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.

5 participants