Mailing List Archive

nessus-libraries/libhosts_gatherer hg_subnet.c, 1.6, 1.7 hg_utils.c, 1.10, 1.11
Update of /usr/local/cvs/nessus-libraries/libhosts_gatherer
In directory raccoon.nessus.org:/tmp/cvs-serv3875/nessus-libraries/libhosts_gatherer

Modified Files:
hg_subnet.c hg_utils.c
Log Message:
Synchronize back DEVEL with 2.2

Index: hg_subnet.c
===================================================================
RCS file: /usr/local/cvs/nessus-libraries/libhosts_gatherer/hg_subnet.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hg_subnet.c 7 Apr 2003 02:10:02 -0000 1.6
+++ hg_subnet.c 12 Sep 2006 09:46:01 -0000 1.7
@@ -92,6 +92,8 @@

if(netmask != 31)
ret.s_addr-=2; /* skip the broadcast */
+ else
+ ret.s_addr-=1; /* skip the broadcast */

ret.s_addr = htonl(ret.s_addr);
return(ret);

Index: hg_utils.c
===================================================================
RCS file: /usr/local/cvs/nessus-libraries/libhosts_gatherer/hg_utils.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- hg_utils.c 19 Jan 2004 20:39:48 -0000 1.10
+++ hg_utils.c 12 Sep 2006 09:46:01 -0000 1.11
@@ -52,6 +52,7 @@
int sz;
{
struct hostent * he = NULL;
+ int i;

he = gethostbyaddr((char *)&ip, sizeof(long), AF_INET);

@@ -60,6 +61,14 @@
else
strncpy(hostname, inet_ntoa(ip), sz - 1);

+ hostname[sz - 1] = '\0';
+ for ( i = 0 ; hostname[i] != '\0' ; i ++ )
+ {
+ if ( ! isalnum(hostname[i]) &&
+ hostname[i] != '.' &&
+ hostname[i] != '_' &&
+ hostname[i] != '-' ) hostname[i] = '?';
+ }
return 0; /* We never fail */
}


_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs