[Tizen]change flag which used for detect ip changed
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / ip_adapter / tizen / caipnwmonitor.c
index 4b16863..5fbdc3a 100644 (file)
@@ -164,13 +164,12 @@ u_arraylist_t *CAFindInterfaceChange()
 
     for (struct nlmsghdr *nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len))
     {
-        if (nh != NULL && nh->nlmsg_type != RTM_NEWLINK)
+        if (nh != NULL && (nh->nlmsg_type != RTM_DELADDR && nh->nlmsg_type != RTM_NEWADDR))
         {
             continue;
         }
         struct ifinfomsg *ifi = (struct ifinfomsg *)NLMSG_DATA(nh);
-
-        if ((!ifi || (ifi->ifi_flags & IFF_LOOPBACK) || !(ifi->ifi_flags & IFF_RUNNING)))
+        if (!ifi)
         {
             continue;
         }
@@ -178,7 +177,6 @@ u_arraylist_t *CAFindInterfaceChange()
         int ifiIndex = ifi->ifi_index;
 
         iflist = CAIPGetInterfaceInformation(ifiIndex);
-
         if (!iflist)
         {
             OIC_LOG_V(ERROR, TAG, "get interface info failed: %s", strerror(errno));