Networking: drivers/net/loopback.c: Eliminate a warning. net/netdev/netdev_ifconfig.c: Was not returning all of the address info.
This commit is contained in:
parent
7af976c00a
commit
ae2a1d07b3
|
@ -133,12 +133,10 @@ static int lo_ifup(FAR struct net_driver_s *dev);
|
|||
static int lo_ifdown(FAR struct net_driver_s *dev);
|
||||
static void lo_txavail_work(FAR void *arg);
|
||||
static int lo_txavail(FAR struct net_driver_s *dev);
|
||||
#if defined(CONFIG_NET_IGMP) || defined(CONFIG_NET_ICMPv6)
|
||||
static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||
static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
|
@ -455,7 +453,7 @@ static int lo_txavail(FAR struct net_driver_s *dev)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NET_IGMP) || defined(CONFIG_NET_ICMPv6)
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
{
|
||||
/* There is no multicast support in the loopback driver */
|
||||
|
|
|
@ -135,6 +135,9 @@ static int ifconf_ipv4_callback(FAR struct net_driver_s *dev, FAR void *arg)
|
|||
*/
|
||||
|
||||
strncpy(req->ifr_name, dev->d_ifname, IFNAMSIZ);
|
||||
|
||||
inaddr->sin_family = AF_INET;
|
||||
inaddr->sin_port = 0;
|
||||
net_ipv4addr_copy(inaddr->sin_addr.s_addr, dev->d_ipaddr);
|
||||
}
|
||||
|
||||
|
@ -206,6 +209,9 @@ static int ifconf_ipv6_callback(FAR struct net_driver_s *dev, FAR void *arg)
|
|||
*/
|
||||
|
||||
strncpy(req->lifr_name, dev->d_ifname, IFNAMSIZ);
|
||||
|
||||
inaddr->sin6_family = AF_INET6;
|
||||
inaddr->sin6_port = 0;
|
||||
net_ipv6addr_copy(inaddr->sin6_addr.s6_addr16, dev->d_ipv6addr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue