sohami commented on a change in pull request #1756: Drill-7185: Drill Fails to 
Read Large Packets
URL: https://github.com/apache/drill/pull/1756#discussion_r276853084
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/decoder/Packet.java
 ##########
 @@ -408,7 +408,7 @@ private void decodePcapHeader(final byte[] header, final 
boolean byteOrder, fina
     timestamp = timestampMicro / 1000L;
     originalLength = getIntFileOrder(byteOrder, header, offset + 
PacketConstants.ORIGINAL_LENGTH_OFFSET);
     packetLength = getIntFileOrder(byteOrder, header, offset + 
PacketConstants.ACTUAL_LENGTH_OFFSET);
-    Preconditions.checkState(originalLength < maxLength,
+    Preconditions.checkState(originalLength <= maxLength,
 
 Review comment:
   based on my understanding from this 
[doc](https://wiki.wireshark.org/Development/LibpcapFileFormat#Global_Header), 
`maxLength` here is the `snaplen` in global header ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to