net: initialize ip_buf_len when receiving packet
When udp_packet_receive is called, ip_buf_len is set 4 bytes too big. This ends up with the client program receiving 4 bytes more than the board actually received. Initialize it correctly alongside other values. Change-Id: I0012aa7e8c6a440a618dfa03c4fdc2b898d592fc Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
This commit is contained in:
parent
70afc2c7ae
commit
0616c2679b
1 changed files with 1 additions and 0 deletions
|
@ -575,6 +575,7 @@ static void udp_packet_receive(struct simple_udp_connection *c,
|
|||
|
||||
ip_buf_appdatalen(buf) = datalen;
|
||||
ip_buf_appdata(buf) = &uip_buf(buf)[UIP_IPUDPH_LEN + UIP_LLH_LEN];
|
||||
ip_buf_len(buf) = datalen + UIP_IPUDPH_LEN + UIP_LLH_LEN;
|
||||
|
||||
NET_DBG("packet received context %p len %d "
|
||||
"appdata %p appdatalen %d\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue