From: Paul Durrant Date: Tue, 10 Jan 2017 17:01:54 +0000 (+0000) Subject: Make sure hash metadata is only set when the algorithm is Toeplitz X-Git-Tag: 8.2.0-rc2^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5c18d844a4ce64be2abd550d66442f6b1a7df326;p=pvdrivers%2Fwin%2Fxennet.git Make sure hash metadata is only set when the algorithm is Toeplitz This is the only supported algorithm. Signed-off-by: Paul Durrant --- diff --git a/src/xennet/receiver.c b/src/xennet/receiver.c index e5635d2..1e6775e 100644 --- a/src/xennet/receiver.c +++ b/src/xennet/receiver.c @@ -285,7 +285,7 @@ __ReceiverReceivePacket( break; default: - break; + goto done; } switch (Hash->Type) { @@ -308,12 +308,16 @@ __ReceiverReceivePacket( NET_BUFFER_LIST_SET_HASH_TYPE(NetBufferList, NDIS_HASH_TCP_IPV6); break; + + default: + ASSERT(FALSE); + break; } NET_BUFFER_LIST_SET_HASH_VALUE(NetBufferList, Hash->Value); - +done: return NetBufferList; fail2: