Commit 02f5929a authored by Simon Duquennoy's avatar Simon Duquennoy
Browse files

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

parent 2e39fe0d
......@@ -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 */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment