llsec: Permit dynamic security levels
This commit is contained in:
parent
0379af3624
commit
10d8b05bc6
22 changed files with 137 additions and 122 deletions
|
@ -152,7 +152,7 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
|
||||
/* Set node with ID == 1 as coordinator, handy in Cooja. */
|
||||
if(node_id == 1) {
|
||||
if(LLSEC802154_CONF_SECURITY_LEVEL) {
|
||||
if(LLSEC802154_ENABLED) {
|
||||
node_role = role_6dr_sec;
|
||||
} else {
|
||||
node_role = role_6dr;
|
||||
|
@ -165,7 +165,7 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
node_role == role_6ln ? "6ln" : (node_role == role_6dr) ? "6dr" : "6dr-sec");
|
||||
|
||||
#if WITH_TSCH
|
||||
tsch_set_pan_secured(LLSEC802154_CONF_SECURITY_LEVEL && (node_role == role_6dr_sec));
|
||||
tsch_set_pan_secured(LLSEC802154_ENABLED && (node_role == role_6dr_sec));
|
||||
#endif /* WITH_TSCH */
|
||||
is_coordinator = node_role > role_6ln;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue