summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/iotivity.spec4
-rw-r--r--resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/packaging/iotivity.spec b/packaging/iotivity.spec
index 7cf490138..5a0e91956 100644
--- a/packaging/iotivity.spec
+++ b/packaging/iotivity.spec
@@ -27,6 +27,10 @@ Source1002: %{name}-test.manifest
%define TARGET_TRANSPORT IP
%endif
+%if "%{TARGET_OS}" == "tizen"
+%define TARGET_TRANSPORT IP
+%endif
+
%define JOB "-j4"
%if 0%{?speedpython}
%define JOB %{?_smp_mflags}
diff --git a/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c b/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c
index 4b16863a7..5fbdc3ac3 100644
--- a/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c
+++ b/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c
@@ -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));