Skip to content

Commit

Permalink
Improve logging message for invalid IP addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-klode committed Feb 29, 2020
1 parent a02a60e commit 447d2a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private InetAddress translateDestinationAdress(IpPacket parsedPacket) {
try {
destAddr = upstreamDnsServers.get(index);
} catch (Exception e) {
Log.e(TAG, "handleDnsRequest: Cannot handle packets to" + parsedPacket.getHeader().getDstAddr().getHostAddress(), e);
Log.e(TAG, "handleDnsRequest: Cannot handle packets to " + parsedPacket.getHeader().getDstAddr().getHostAddress() + " - not a valid address for this network", e);
return null;
}
Log.d(TAG, String.format("handleDnsRequest: Incoming packet to %s AKA %d AKA %s", parsedPacket.getHeader().getDstAddr().getHostAddress(), index, destAddr));
Expand Down

0 comments on commit 447d2a0

Please sign in to comment.