net: Initialize Contiki vars related to L2 buffer mgmt
The l2_buf struct contains variables that Contiki uses for it's state management. It is important that we initialize these variables into sane values otherwise there will be hard to catch errors like overwriting memory in other parts of the system. Change-Id: Id0f552a6f0f2858fc6e8e4964ada0715a40f46f8 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
6d2276e160
commit
cd14f65ebe
1 changed files with 2 additions and 0 deletions
|
@ -125,6 +125,8 @@ struct net_buf *l2_buf_get_reserve(uint16_t reserve_head)
|
|||
NET_DBG("buf %p reserve %u ref %d\n", buf, reserve_head, buf->ref);
|
||||
#endif
|
||||
|
||||
packetbuf_clear(buf);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue