Skip to content

Commit

Permalink
bbr start called after seq number updated. (ARMmbed#1875)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakvenugopal authored Oct 23, 2018
1 parent 98be8b2 commit 7327652
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/6LoWPAN/Thread/thread_extension_bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,14 +1441,17 @@ int thread_extension_bbr_address_set(int8_t interface_id, const uint8_t *addr_pt
int thread_extension_bbr_sequence_number_set(int8_t interface_id, uint8_t seq_number)
{
thread_pbbr_t *this = thread_bbr_find_by_interface(interface_id);

if (!this) {
return -1;
}
if (seq_number) {
this->sequence_number = --seq_number;
}

if(this->backbone_interface_id < 0 || !this->pbbr_started) {
// it is ok to change seq number before the start of pbbr
return 0;
}
thread_extension_bbr_pbbr_start(this);
return 0;
}

Expand Down

0 comments on commit 7327652

Please sign in to comment.