insert_srh_header: return 0 when failing to insert SRH due too packet too long
This commit is contained in:
parent
2e39fe0d6b
commit
02f5929ade
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue