changed so that ext hdr len code checks against buffer size instead of link mtu

This commit is contained in:
Joakim Eriksson 2012-01-10 15:51:06 +01:00
parent 9d261eec56
commit 237100f6fa

2
core/net/rpl/rpl-ext-header.c Executable file → Normal file
View File

@ -168,7 +168,7 @@ rpl_update_header_empty(void)
break; break;
default: default:
PRINTF("RPL: No hop-by-hop option found, creating it\n"); PRINTF("RPL: No hop-by-hop option found, creating it\n");
if(uip_len + RPL_HOP_BY_HOP_LEN > UIP_LINK_MTU) { if(uip_len + RPL_HOP_BY_HOP_LEN > UIP_BUFSIZE) {
PRINTF("RPL: Packet too long: impossible to add hop-by-hop option\n"); PRINTF("RPL: Packet too long: impossible to add hop-by-hop option\n");
uip_ext_len = last_uip_ext_len; uip_ext_len = last_uip_ext_len;
return; return;