net/icmpv6/icmpv6_autoconfig.c: Use ntohs() to convert IPv6 address from network to host order int network debug output.

This commit is contained in:
Bernd Walter 2019-07-06 07:02:51 -06:00 committed by Gregory Nutt
parent 90bed3383e
commit 5d01ce6c58

View File

@ -45,6 +45,8 @@
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
#include <arpa/inet.h>
#include <nuttx/semaphore.h> #include <nuttx/semaphore.h>
#include <nuttx/net/net.h> #include <nuttx/net/net.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
@ -338,8 +340,8 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev, FAR struct socket *psock)
icmpv6_linkipaddr(dev, lladdr); icmpv6_linkipaddr(dev, lladdr);
ninfo("lladdr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("lladdr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
lladdr[0], lladdr[1], lladdr[2], lladdr[3], ntohs(lladdr[0]), ntohs(lladdr[1]), ntohs(lladdr[2]), ntohs(lladdr[3]),
lladdr[4], lladdr[6], lladdr[6], lladdr[7]); ntohs(lladdr[4]), ntohs(lladdr[5]), ntohs(lladdr[6]), ntohs(lladdr[7]));
#ifdef CONFIG_NET_ICMPv6_NEIGHBOR #ifdef CONFIG_NET_ICMPv6_NEIGHBOR
/* 2. Link-Local Address Uniqueness Test: The node tests to ensure that /* 2. Link-Local Address Uniqueness Test: The node tests to ensure that