33 |
|
#include <errno.h> |
34 |
|
#include <fcntl.h> |
35 |
|
#include <poll.h> |
36 |
+ |
#include <sys/socket.h> |
37 |
+ |
#include <netinet/in.h> |
38 |
+ |
#include <arpa/inet.h> |
39 |
|
|
40 |
|
#include "compat.h" |
41 |
|
#include "config.h" |
308 |
|
void |
309 |
|
scan_connect(char **user, char *msg) |
310 |
|
{ |
311 |
< |
struct bopm_sockaddr ip; |
311 |
> |
struct sockaddr_in ip; |
312 |
|
node_t *p, *p2; |
313 |
|
struct scan_struct *ss; |
314 |
|
struct scanner_struct *scs; |
326 |
|
/* Check negcache before anything */ |
327 |
|
if (OptionsItem->negcache > 0) |
328 |
|
{ |
329 |
< |
if (inet_pton(AF_INET, user[3], &(ip.sa4.sin_addr)) <= 0) |
329 |
> |
if (inet_pton(AF_INET, user[3], &ip.sin_addr) <= 0) |
330 |
|
{ |
331 |
|
log_printf("SCAN -> Invalid IPv4 address '%s'!", user[3]); |
332 |
|
return; |
333 |
|
} |
334 |
|
else |
335 |
|
{ |
336 |
< |
if (check_neg_cache(ip.sa4.sin_addr.s_addr)) |
336 |
> |
if (check_neg_cache(ip.sin_addr.s_addr)) |
337 |
|
{ |
338 |
|
if (OPT_DEBUG) |
339 |
|
log_printf("SCAN -> %s!%s@%s (%s) is negatively cached. " |