Networking: Drivers can have both IPv4 and IPv6 addesses, but a socket can only only one or the other; The socket connnection structures need to include a union of IPv4 and IPv6 addresses for the local address binding and for the remote address connections

This commit is contained in:
Gregory Nutt
2015-01-16 10:01:54 -06:00
parent fe8b3c5220
commit bee89be4f4
17 changed files with 113 additions and 75 deletions
+2 -2
View File
@@ -209,7 +209,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
else
#endif
#ifdef CONFIG_NET_ICMPv6
if (net_ipv6addr_cmp(dev->d_ipaddr, g_allzeroaddr))
if (net_ipv6addr_cmp(dev->d_ipv6addr, g_allzeroaddr))
{
/* If we are configured to use ping IP address configuration and
* hasn't been assigned an IP address yet, we accept all ICMP
@@ -233,7 +233,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
* multicast packets that are sent to the ff02::/16 addresses.
*/
if (!net_ipv6addr_cmp(pbuf->destipaddr, dev->d_ipaddr) &&
if (!net_ipv6addr_cmp(pbuf->destipaddr, dev->d_ipv6addr) &&
pbuf->destipaddr[0] != 0xff02)
{
#ifdef CONFIG_NET_STATISTICS