Hans Leidekker : wbemprox: Don't list loopback network adapters.

Alexandre Julliard julliard at winehq.org
Tue Feb 11 13:32:40 CST 2014


Module: wine
Branch: master
Commit: 386d2aa8b7f704f992a6685d9be9616da660f49b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=386d2aa8b7f704f992a6685d9be9616da660f49b

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Feb 11 09:55:48 2014 +0100

wbemprox: Don't list loopback network adapters.

---

 dlls/wbemprox/builtin.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index afa32b5..4b02ea2 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -1616,7 +1616,10 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
         heap_free( buffer );
         return FILL_STATUS_FAILED;
     }
-    for (aa = buffer; aa; aa = aa->Next) count++;
+    for (aa = buffer; aa; aa = aa->Next)
+    {
+        if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
+    }
     if (!resize_table( table, count, sizeof(*rec) ))
     {
         heap_free( buffer );
@@ -1624,6 +1627,8 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
     }
     for (aa = buffer; aa; aa = aa->Next)
     {
+        if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
+
         rec = (struct record_networkadapter *)(table->data + offset);
         sprintfW( device_id, fmtW, aa->u.s.IfIndex );
         rec->adaptertype          = get_adaptertype( aa->IfType, &physical );
@@ -1669,7 +1674,10 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
         heap_free( buffer );
         return FILL_STATUS_FAILED;
     }
-    for (aa = buffer; aa; aa = aa->Next) count++;
+    for (aa = buffer; aa; aa = aa->Next)
+    {
+        if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
+    }
     if (!resize_table( table, count, sizeof(*rec) ))
     {
         heap_free( buffer );
@@ -1677,6 +1685,8 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
     }
     for (aa = buffer; aa; aa = aa->Next)
     {
+        if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
+
         rec = (struct record_networkadapterconfig *)(table->data + offset);
         rec->index              = aa->u.s.IfIndex;
         rec->ipconnectionmetric = 20;




More information about the wine-cvs mailing list