mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 16:01:18 +01:00
Merge pull request #3105 from cgundogan/ng_netdev_eth_marshall
ng_netdev_eth: default to NG_ETHERTYPE_UNKNOWN when no payload avail.
This commit is contained in:
commit
a10beb25f4
@ -373,7 +373,12 @@ static int _marshall_ethernet(ng_netdev_eth_t *dev, uint8_t *buffer, ng_pktsnip_
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
hdr->type = byteorder_htons(ng_nettype_to_ethertype(pkt->next->type));
|
||||
if (payload) {
|
||||
hdr->type = byteorder_htons(ng_nettype_to_ethertype(payload->type));
|
||||
}
|
||||
else {
|
||||
hdr->type = byteorder_htons(NG_ETHERTYPE_UNKNOWN);
|
||||
}
|
||||
|
||||
netif_hdr = pkt->data;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user