rpl_verify_header: do not select DAG in storing mode after updating neighbor rank, as this may result in a No-Path DAO being sent, which will drop the current packet.

This commit is contained in:
Simon Duquennoy 2016-06-03 21:18:15 +02:00 committed by Simon Duquennoy
parent 343c274359
commit 6cdec70798

View File

@ -136,7 +136,12 @@ rpl_verify_hbh_header(int uip_ext_opt_offset)
/* A rank error was signalled, attempt to repair it by updating /* A rank error was signalled, attempt to repair it by updating
* the sender's rank from ext header */ * the sender's rank from ext header */
sender->rank = sender_rank; sender->rank = sender_rank;
rpl_select_dag(instance, sender); if(RPL_IS_NON_STORING(instance)) {
/* Select DAG and preferred parent only in non-storing mode. In storing mode,
* a parent switch would result in an immediate No-path DAO transmission, dropping
* current incoming packet. */
rpl_select_dag(instance, sender);
}
} }
sender_closer = sender_rank < instance->current_dag->rank; sender_closer = sender_rank < instance->current_dag->rank;