Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Dns: don't choke at chained names
Browse files Browse the repository at this point in the history
  • Loading branch information
minexew committed Feb 8, 2017
1 parent 82d5b23 commit c69d031
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SnailNet/Dns.HC
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ static I64 DnsParseDomainName(U8* packet_data, I64 packet_length,
else if (label_len >= 192) {
label_len &= 0x3f;

*data_inout = data + 1;
*length_inout = length - 1;
jump_taken = TRUE;
if (!jump_taken) {
*data_inout = data + 1;
*length_inout = length - 1;
jump_taken = TRUE;
}

//"jmp %d\n", ((label_len << 8) | *data);

Expand Down

0 comments on commit c69d031

Please sign in to comment.