|
|
@@ -488,7 +488,16 @@ extern "C" { |
|
|
|
sockaddr_in *SaIn = (sockaddr_in *) HostAddr; // Fetch the IP address.
|
|
|
|
|
|
|
|
Context->ConnectionData.HostName = HostName; // Load the info.
|
|
|
|
Context->ConnectionData.HostIP = ntohl(SaIn->sin_addr.s_addr);
|
|
|
|
|
|
|
|
if (0 == SaIn) { // If HostAddr is 0...
|
|
|
|
|
|
|
|
Context->ConnectionData.HostIP = "127.0.0.1"; // Set to a valid value.
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
Context->ConnectionData.HostIP = ntohl(SaIn->sin_addr.s_addr);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (MilterDebugMode) {
|
|
|
|
ostringstream Temp;
|
|
|
@@ -497,6 +506,12 @@ extern "C" { |
|
|
|
logInfo(ContextName, InfoCode, Temp.str());
|
|
|
|
}
|
|
|
|
|
|
|
|
if (0 == SaIn) { // If HostAddr is 0, don't do a scan.
|
|
|
|
|
|
|
|
return FailSafeMilterResponse;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SNFMilterAction IpScanResult; // Perform IP scan.
|
|
|
|
|
|
|
|
IpScanResult = Context->milterEngine.scanIP(Context->ConnectionData.HostIP);
|