mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-08-15 12:27:50 +00:00
Bugfix: don't send packets if they are shorter than the link layer header length
This commit is contained in:
@@ -279,6 +279,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Remove header from length before passing onward
|
//Remove header from length before passing onward
|
||||||
|
if(uip_len > UIP_LLH_LEN) {
|
||||||
uip_len -= UIP_LLH_LEN;
|
uip_len -= UIP_LLH_LEN;
|
||||||
|
|
||||||
//Some IP packets have link layer in them, need to change them around!
|
//Some IP packets have link layer in them, need to change them around!
|
||||||
@@ -292,6 +293,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||||||
tcpip_output(destAddrPtr);
|
tcpip_output(destAddrPtr);
|
||||||
/* rndis_stat.txok++; */
|
/* rndis_stat.txok++; */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uip_len = 0;
|
uip_len = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user