From b51c00c8d75faac59a6aadd65b278c87f7d40238 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 23 Jan 2015 09:30:50 -0600 Subject: [PATCH] Networking: Need to set the IPv6 EtherType on outgoing IPv6 packets --- net/icmpv6/icmpv6_input.c | 4 ++++ net/icmpv6/icmpv6_solicit.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index ef10abc75df..4e2f2236618 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -218,6 +218,10 @@ void icmpv6_input(FAR struct net_driver_s *dev) memcpy(eth->dest, eth->src, ETHER_ADDR_LEN); memcpy(eth->src, dev->d_mac.ether_addr_octet, ETHER_ADDR_LEN); + + /* Set the IPv6 Ethernet type */ + + eth->type = HTONS(ETHTYPE_IP6); } #endif } diff --git a/net/icmpv6/icmpv6_solicit.c b/net/icmpv6/icmpv6_solicit.c index 0bafd67ccde..a03f6ba89ef 100644 --- a/net/icmpv6/icmpv6_solicit.c +++ b/net/icmpv6/icmpv6_solicit.c @@ -186,6 +186,9 @@ void icmpv6_solicit(FAR struct net_driver_s *dev, memcpy(eth->src, dev->d_mac.ether_addr_octet, ETHER_ADDR_LEN); + /* Set the IPv6 Ethernet type */ + + eth->type = HTONS(ETHTYPE_IP6); #if 0 /* No additional neighbor lookup is required on this packet. * REVISIT: It is inappropriate to set this bit if we get here