Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support long enough packets, reassembled or not

  • Loading branch information...
commit 2f3774326feaaeb664f62ee1be8b5b661eb72ef4 1 parent be037ab
@wnagele wnagele authored
View
2  hadoop-pcap-lib/src/main/java/net/ripe/hadoop/pcap/DnsPcapReader.java
@@ -45,7 +45,7 @@ protected void processPacketPayload(Packet packet, byte[] payload) {
if (DNS_PORT == (Integer)packet.get(Packet.SRC_PORT) || DNS_PORT == (Integer)packet.get(Packet.DST_PORT)) {
if (PROTOCOL_TCP.equals(packet.get(Packet.PROTOCOL)) &&
- packet.containsKey(Packet.REASSEMBLED_FRAGMENTS)) // TODO Support DNS responses with multiple messages (as used for XFRs)
+ payload.length > 2) // TODO Support DNS responses with multiple messages (as used for XFRs)
payload = Arrays.copyOfRange(payload, 2, payload.length); // First two bytes denote the size of the DNS message, ignore them
try {
Message msg = new Message(payload);
Please sign in to comment.
Something went wrong with that request. Please try again.