1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-16 19:39:03 +00:00

Add an #ifdef guard around the use of IPV6_V6ONLY.

This definition is missing on Solaris 9. This was initially reported by
Dagobert Michelsen.
http://seclists.org/nmap-dev/2011/q4/15
This commit is contained in:
david
2012-04-10 03:19:39 +00:00
parent be20fc35d6
commit ed35bfcfc9
2 changed files with 5 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*-
o Fixed a compilation problem on Solaris 9 caused by a missing
definition of IPV6_V6ONLY. Reported by Dagobert Michelsen.
o Upgraded included libpcap to version 1.2.1.
o [NSE] Added hostmap-robtex.nse by Arturo Busleiman, which finds other

View File

@@ -393,6 +393,7 @@ int do_listen(int type, int proto, const union sockaddr_u *srcaddr_u)
http://msdn.microsoft.com/en-us/library/bb513665
*/
#ifdef IPPROTO_IPV6
#ifdef IPV6_V6ONLY
if (srcaddr_u->storage.ss_family == AF_INET6) {
int set = 1;
/* Tell it to not try and bind to IPV4 */
@@ -400,6 +401,7 @@ int do_listen(int type, int proto, const union sockaddr_u *srcaddr_u)
die("Unable to set IPV6 socket to bind only to IPV6");
}
#endif
#endif
#ifdef HAVE_SOCKADDR_SA_LEN
sa_len = srcaddr_u->sockaddr.sa_len;