From: Paul Durrant Date: Fri, 13 Mar 2015 12:19:37 +0000 (+0000) Subject: Fix NDISTest PacketFilters test X-Git-Tag: 8.1.0-rc1~15 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1df564a4c96f900b3587aa4c63de85f7f7b4f2cc;p=pvdrivers%2Fwin%2Fxennet.git Fix NDISTest PacketFilters test 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 --- diff --git a/src/xennet/adapter.c b/src/xennet/adapter.c index 8616579..f96386c 100644 --- a/src/xennet/adapter.c +++ b/src/xennet/adapter.c @@ -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;