mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ng_udp: fix setting of length field
udp_slip contains the UDP header already so this line technically adds the length of the UDP header twice.
This commit is contained in:
parent
c4d0252354
commit
797de13f01
@ -154,7 +154,7 @@ static void _send(ng_pktsnip_t *pkt)
|
||||
}
|
||||
hdr = (ng_udp_hdr_t *)udp_snip->data;
|
||||
/* fill in size field */
|
||||
hdr->length = byteorder_htons(sizeof(ng_udp_hdr_t) + ng_pkt_len(udp_snip));
|
||||
hdr->length = byteorder_htons(ng_pkt_len(udp_snip));
|
||||
|
||||
/* and forward packet to the network layer */
|
||||
sendto = ng_netreg_lookup(pkt->type, NG_NETREG_DEMUX_CTX_ALL);
|
||||
|
Loading…
Reference in New Issue
Block a user