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:
Jukka Rissanen 2015-09-29 12:39:57 +03:00 committed by Anas Nashif
commit b14fdb8b5d

View file

@ -1146,6 +1146,9 @@ uip_process(struct net_buf *buf, uint8_t flag)
*/ */
} else { } else {
UIP_LOG("ip: packet shorter than reported in IP header."); 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; goto drop;
} }