You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2017/04/19 18:18:23 UTC

[27/30] incubator-mynewt-core git commit: native_sockets; fill in LINK flag when querying interfaces in sim.

native_sockets; fill in LINK flag when querying interfaces in sim.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/bcba6bd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/bcba6bd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/bcba6bd9

Branch: refs/heads/master
Commit: bcba6bd9d35bcd9f8caf2baa3ec5b365097916dc
Parents: ed273ed
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Apr 17 15:25:48 2017 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Apr 17 15:25:48 2017 -0700

----------------------------------------------------------------------
 net/ip/native_sockets/src/native_itf.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bcba6bd9/net/ip/native_sockets/src/native_itf.c
----------------------------------------------------------------------
diff --git a/net/ip/native_sockets/src/native_itf.c b/net/ip/native_sockets/src/native_itf.c
index 6c186ca..2d491b0 100644
--- a/net/ip/native_sockets/src/native_itf.c
+++ b/net/ip/native_sockets/src/native_itf.c
@@ -34,9 +34,12 @@ itf_flags(int if_flags)
 
     flags = 0;
 
-    if ((if_flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING)) {
+    if (if_flags & IFF_UP) {
         flags |= MN_ITF_F_UP;
     }
+    if (if_flags & IFF_RUNNING) {
+        flags |= MN_ITF_F_LINK;
+    }
     if (if_flags & IFF_MULTICAST) {
         flags |= MN_ITF_F_MULTICAST;
     }