net: contiki: Print detailed info if packet len is wrong
If IPv6 packet length is incorrect, then print the actual length values for debugging aid. Change-Id: I20d4d73efd1e0103f670e8e53ba6417a4795ab80 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
f857815455
commit
b14fdb8b5d
1 changed files with 3 additions and 0 deletions
|
@ -1146,6 +1146,9 @@ uip_process(struct net_buf *buf, uint8_t flag)
|
|||
*/
|
||||
} else {
|
||||
UIP_LOG("ip: packet shorter than reported in IP header.");
|
||||
PRINTF("IPv6 packet size %d buf len %d\n",
|
||||
(UIP_IP_BUF(buf)->len[0] << 8) + UIP_IP_BUF(buf)->len[1],
|
||||
uip_len(buf));
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue