net/lldp: Fix where Ethernet PTYPE is set for LLDP message

Since the rework of L2/L3 split, only L2 has access to its header. Thus
up to Ethernet one to set LLDP PTYPE.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2019-01-11 13:35:11 +01:00 committed by Jukka Rissanen
commit 9a41078c51
2 changed files with 2 additions and 4 deletions

View file

@ -523,6 +523,8 @@ static int ethernet_send(struct net_if *iface, struct net_pkt *pkt)
ptype = htons(NET_ETH_PTYPE_IPV6);
} else if (IS_ENABLED(CONFIG_NET_GPTP) && net_pkt_is_gptp(pkt)) {
ptype = htons(NET_ETH_PTYPE_PTP);
} else if (IS_ENABLED(CONFIG_NET_LLDP) && net_pkt_is_lldp(pkt)) {
ptype = htons(NET_ETH_PTYPE_LLDP);
} else if (IS_ENABLED(CONFIG_NET_ARP)) {
/* Unktown type: Unqueued pkt is an ARP reply.
*/