]> xenbits.xensource.com Git - people/pauldu/xennet.git/commitdiff
Fix NDISTest PacketFilters test
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 13 Mar 2015 12:19:37 +0000 (12:19 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 13 Mar 2015 12:19:37 +0000 (12:19 +0000)
The PacketFilters test fails because it has apparently discovered a whole
load of invalid filters. This, as it turns out, is not because of any bug
in the query OID code but rather in the set OID code. The code as it stands
returns success even for setting an invalid filter, and this is why the
test believes those filters are enabled.
This patch stops ignoring the resturn code of AdapterSetPacketFilter and
hence fixes the test.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xennet/adapter.c

index 8616579529966ae51b451c030277749b55541a6c..f96386c0907b142fdf866a4a3c58c340e396c448 100644 (file)
@@ -1093,8 +1093,8 @@ AdapterSetInformation(
     case OID_GEN_CURRENT_PACKET_FILTER:
         BytesNeeded = sizeof(ULONG);
         if (BufferLength == BytesNeeded) {
-            AdapterSetPacketFilter(Adapter,
-                                   (PULONG)Buffer);
+            ndisStatus = AdapterSetPacketFilter(Adapter,
+                                                (PULONG)Buffer);
             BytesRead = sizeof(ULONG);
         }
         break;