insert_srh_header: return 0 when failing to insert SRH due too packet too long

This commit is contained in:
Simon Duquennoy 2017-10-12 09:28:15 +02:00
parent 2e39fe0d6b
commit 02f5929ade
2 changed files with 2 additions and 2 deletions

View File

@ -410,7 +410,7 @@ insert_srh_header(void)
/* Check if there is enough space to store the extension header */
if(uip_len + ext_len > UIP_BUFSIZE) {
PRINTF("RPL: Packet too long: impossible to add source routing header (%u bytes)\n", ext_len);
return 1;
return 0;
}
/* Move existing ext headers and payload uip_ext_len further */

View File

@ -302,7 +302,7 @@ insert_srh_header(void)
/* Check if there is enough space to store the extension header */
if(uip_len + ext_len > UIP_BUFSIZE) {
LOG_ERR("packet too long: impossible to add source routing header (%u bytes)\n", ext_len);
return 1;
return 0;
}
/* Move existing ext headers and payload uip_ext_len further */