From 2980a12373244434cb01586196e48b904210f471 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 25 Aug 2016 14:25:16 +0200 Subject: [PATCH] Fix ntohs -> htons in ethernet.c --- src/netif/ethernet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c index 681991ee..88705f3b 100644 --- a/src/netif/ethernet.c +++ b/src/netif/ethernet.c @@ -258,7 +258,7 @@ ethernet_output(struct netif* netif, struct pbuf* p, u16_t eth_type) { struct eth_hdr* ethhdr; - u16_t eth_type_be = ntohs(eth_type); + u16_t eth_type_be = htons(eth_type); #if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) s32_t vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type); @@ -272,7 +272,7 @@ ethernet_output(struct netif* netif, struct pbuf* p, } vlanhdr = (struct eth_vlan_hdr*)(((u8_t*)p->payload) + SIZEOF_ETH_HDR); vlanhdr->tpid = eth_type_be; - vlanhdr->prio_vid = ntohs((u16_t)vlan_prio_vid); + vlanhdr->prio_vid = htons((u16_t)vlan_prio_vid); eth_type_be = PP_HTONS(ETHTYPE_VLAN); } else