Parse DNS packet only when DNS redirection is enabled

This commit is contained in:
ValdikSS 2017-12-09 02:36:45 +03:00
parent a67f42eebc
commit 064cf575b6

View File

@ -559,7 +559,7 @@ int main(int argc, char *argv[]) {
}
/* Else if we got UDP packet with data */
else if (WinDivertHelperParsePacket(packet, packetLen, &ppIpHdr,
else if (do_dns_redirect && WinDivertHelperParsePacket(packet, packetLen, &ppIpHdr,
NULL, NULL, NULL, NULL, &ppUdpHdr, &packet_data, &packet_dataLen)) {
if (addr.Direction == WINDIVERT_DIRECTION_INBOUND) {