currently only one IP network is enabled due to the bug
Change-Id: I878dec13ec7e4da6a5b2867d8b3c28fb99d85530
Signed-off-by: jnashok <jn.ashok@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1107
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: John Light <john.j.light@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
OIC_LOG_V(DEBUG, IP_MONITOR_TAG, "CAIPUpdateInterfaceInformation : %d", interfaces);
OIC_LOG_V(DEBUG, IP_MONITOR_TAG, "CAIPUpdateInterfaceInformation : %d", interfaces);
+ if(0 == interfaces)
+ {
+ OIC_LOG(ERROR, IP_MONITOR_TAG, "no interfaces");
+ return CA_STATUS_FAILED;
+ }
+
for (int32_t i = 0; i < interfaces; i++)
{
struct ifreq temp_ifr = { 0 };
for (int32_t i = 0; i < interfaces; i++)
{
struct ifreq temp_ifr = { 0 };
if ((temp_ifr.ifr_flags & IFF_LOOPBACK)
|| !(temp_ifr.ifr_flags & IFF_UP) || !(temp_ifr.ifr_flags & IFF_RUNNING))
{
if ((temp_ifr.ifr_flags & IFF_LOOPBACK)
|| !(temp_ifr.ifr_flags & IFF_UP) || !(temp_ifr.ifr_flags & IFF_RUNNING))
{
+ OIC_LOG_V(ERROR, IP_MONITOR_TAG,
+ "interface is not up or not running or loopback = %x", temp_ifr.ifr_flags);
OIC_LOG_V(DEBUG, IP_MONITOR_TAG, "ipAddress : %s, interfaceName : %s, subnetmask : %s",
netInfo->ipAddress, netInfo->interfaceName, netInfo->subnetMask);
OIC_LOG_V(DEBUG, IP_MONITOR_TAG, "ipAddress : %s, interfaceName : %s, subnetmask : %s",
netInfo->ipAddress, netInfo->interfaceName, netInfo->subnetMask);
- close(sck);
- return CA_STATUS_OK;
-
- break;
}
close(sck);
OIC_LOG(DEBUG, IP_MONITOR_TAG, "OUT");
}
close(sck);
OIC_LOG(DEBUG, IP_MONITOR_TAG, "OUT");
- return CA_STATUS_FAILED;
}
static bool CACheckIsAnyInterfaceDown(const u_arraylist_t *netInterfaceList,
}
static bool CACheckIsAnyInterfaceDown(const u_arraylist_t *netInterfaceList,