IOT-1378 Fix windows\CAIPNWMonitor.c
authorDaniel Ferguson <daniel.j.ferguson@intel.com>
Thu, 29 Sep 2016 18:33:04 +0000 (11:33 -0700)
committerDave Thaler <dthaler@microsoft.com>
Sat, 1 Oct 2016 19:57:21 +0000 (19:57 +0000)
* Allow IPv4 and IPv6 to coexist. Previously, these two
  modes were mutually exclusive.

Change-Id: I5c04289590b0edd58dc854722c0288a99b4c70c9
Signed-off-by: Daniel Ferguson <daniel.j.ferguson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12699
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-by: David Antler <david.a.antler@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
resource/csdk/connectivity/src/ip_adapter/windows/caipnwmonitor.c

index 7d3088f..a91b159 100644 (file)
@@ -182,7 +182,8 @@ bool AddInterfaces(PIP_ADAPTER_ADDRESSES pAdapterAddr, u_arraylist_t *iflist, in
                 OIC_LOG_V(DEBUG, TAG, "\t\tIPv6 interface %i not valid, skipping...", pCurAdapterAddr->IfIndex);
             }
         }
-        else if (pCurAdapterAddr->Flags & IP_ADAPTER_IPV4_ENABLED)
+
+        if (pCurAdapterAddr->Flags & IP_ADAPTER_IPV4_ENABLED)
         {
             // Do not add loopback, duplicate, or non-operational adapters
             if (IsValidAdapter(pCurAdapterAddr, desiredIndex, AF_INET))