Merge pull request #2103 from stringr9/bugfix/non-storing-drop-fix
Don't drop packets bound for outside the RPL mesh in non-storing mode
This commit is contained in:
commit
7342a3f8a7
|
@ -642,12 +642,18 @@ rpl_update_header(void)
|
||||||
|
|
||||||
if(default_instance->current_dag->rank == ROOT_RANK(default_instance)) {
|
if(default_instance->current_dag->rank == ROOT_RANK(default_instance)) {
|
||||||
/* At the root, remove headers if any, and insert SRH or HBH
|
/* At the root, remove headers if any, and insert SRH or HBH
|
||||||
* (SRH is inserted only if the destination is in the DODAG) */
|
* (SRH is inserted only if the destination is in the DODAG) */
|
||||||
rpl_remove_header();
|
rpl_remove_header();
|
||||||
if(RPL_IS_NON_STORING(default_instance)) {
|
if(rpl_get_dag(&UIP_IP_BUF->destipaddr) != NULL) {
|
||||||
return insert_srh_header();
|
/* dest is in a DODAG; the packet is going down. */
|
||||||
|
if(RPL_IS_NON_STORING(default_instance)) {
|
||||||
|
return insert_srh_header();
|
||||||
|
} else {
|
||||||
|
return insert_hbh_header(default_instance);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return insert_hbh_header(default_instance);
|
/* dest is outside of DODAGs; no ext header is needed. */
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(uip_ds6_is_my_addr(&UIP_IP_BUF->srcipaddr)
|
if(uip_ds6_is_my_addr(&UIP_IP_BUF->srcipaddr)
|
||||||
|
|
Loading…
Reference in a new issue