Changeset 1490

Show
Ignore:
Timestamp:
12/12/07 11:19:31 (9 months ago)
Author:
till
Message:

honeytrap
- address confusion, getsockname instead of getpeername

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeytrap/trunk/src/attack.c

    r1489 r1490  
    102102 
    103103        if (!a_size) { 
    104                 addr = (struct in_addr *) &(a->a_conn.r_addr); 
     104                addr = (struct in_addr *) &(a->a_conn.l_addr); 
    105105                logmsg(LOG_NOTICE, 1, " * %u/%s\t  No bytes received from %s:%u.\n", 
    106106                        (uint16_t) a->a_conn.l_port, PROTO(a->a_conn.protocol), 
    107107                        inet_ntoa(*addr), a->a_conn.r_port); 
    108108        } else { 
    109                 addr = (struct in_addr *) &(a->a_conn.r_addr); 
     109                addr = (struct in_addr *) &(a->a_conn.l_addr); 
    110110                logmsg(LOG_NOTICE, 1, " * %u/%s\t  %d bytes attack string from %s:%u.\n", 
    111111                        (uint16_t) a->a_conn.l_port, PROTO(a->a_conn.protocol), a_size, 
  • honeytrap/trunk/src/dynsrv.c

    r1440 r1490  
    240240 
    241241                                                /* update remote endpoint information for attack structure */ 
    242                                                 if (getpeername 
    243                                                     (connection_fd, (struct sockaddr *) &cliaddr, 
     242                                                if (getpeername(connection_fd, (struct sockaddr *) &cliaddr, 
    244243                                                     &cliaddr_len) < 0) { 
    245244                                                        if (errno == EINTR)