summaryrefslogtreecommitdiff
path: root/security/nmap/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/nmap/files')
-rw-r--r--security/nmap/files/patch-output.cc2
-rw-r--r--security/nmap/files/patch-scan_engine.cc11
-rw-r--r--security/nmap/files/patch-traceroute.cc21
3 files changed, 33 insertions, 1 deletions
diff --git a/security/nmap/files/patch-output.cc b/security/nmap/files/patch-output.cc
index af5c99e6ef48..b64921477b93 100644
--- a/security/nmap/files/patch-output.cc
+++ b/security/nmap/files/patch-output.cc
@@ -7,4 +7,4 @@
+#include <sys/param.h>
#include <sstream>
- /* Workaround for lack of namespace std on HP-UX 11.00 */
+ extern NmapOps o;
diff --git a/security/nmap/files/patch-scan_engine.cc b/security/nmap/files/patch-scan_engine.cc
new file mode 100644
index 000000000000..5f8f117793f0
--- /dev/null
+++ b/security/nmap/files/patch-scan_engine.cc
@@ -0,0 +1,11 @@
+--- ./scan_engine.cc.orig 2013-01-06 16:38:44.000000000 +0100
++++ ./scan_engine.cc 2013-01-06 16:38:44.000000000 +0100
+@@ -2999,7 +2999,7 @@
+ }
+ if (o.spoofsource && !bind_failed) {
+ o.SourceSockAddr(&ss, &sslen);
+- if (bind(sd, (struct sockaddr*)&ss, sslen) != 0) {
++ if (::bind(sd, (struct sockaddr*)&ss, sslen) != 0) {
+ error("%s: Problem binding source address (%s), errno: %d", __func__, inet_socktop(&ss), socket_errno());
+ perror("bind");
+ bind_failed = 1;
diff --git a/security/nmap/files/patch-traceroute.cc b/security/nmap/files/patch-traceroute.cc
new file mode 100644
index 000000000000..45efde4213ba
--- /dev/null
+++ b/security/nmap/files/patch-traceroute.cc
@@ -0,0 +1,21 @@
+--- ./traceroute.cc.orig 2013-01-06 16:38:44.000000000 +0100
++++ ./traceroute.cc 2013-01-06 16:38:44.000000000 +0100
+@@ -190,8 +190,6 @@
+ /* A global random token used to distinguish this traceroute's probes from
+ those of other traceroutes possibly running on the same machine. */
+ static u16 global_id;
+-/* A global cache of known hops, indexed by TTL and address. */
+-static std::map<struct HopIdent, Hop *> hop_cache;
+ /* A list of timedout hops, which are not kept in hop_cache, so we can delete
+ all hops on occasion. */
+ static std::list<Hop *> timedout_hops;
+@@ -204,6 +202,9 @@
+ static struct timeval get_now(struct timeval *now = NULL);
+ static const char *ss_to_string(const struct sockaddr_storage *ss);
+
++/* A global cache of known hops, indexed by TTL and address. */
++static std::map<struct HopIdent, Hop *> hop_cache;
++
+ struct Hop {
+ Hop *parent;
+ struct sockaddr_storage tag;