Skip to content

Commit

Permalink
Support long enough packets, reassembled or not
Browse files Browse the repository at this point in the history
  • Loading branch information
wnagele committed Sep 2, 2013
1 parent be037ab commit 2f37743
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2f37743

Please sign in to comment.