aboutsummaryrefslogtreecommitdiff
path: root/net/hping
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2015-12-22 15:51:01 +0000
committerKevin Lo <kevlo@FreeBSD.org>2015-12-22 15:51:01 +0000
commit63ba01e7c150fb6cdfcc54af2e8fa84530474b1b (patch)
tree4cf8d4ee62dc26f860bb2daac01240734ccac617 /net/hping
parent028afdd2fb59cf94caa3d4154b0512a2396a6b5a (diff)
downloadports-63ba01e7c150fb6cdfcc54af2e8fa84530474b1b.tar.gz
ports-63ba01e7c150fb6cdfcc54af2e8fa84530474b1b.zip
Notes
Diffstat (limited to 'net/hping')
-rw-r--r--net/hping/Makefile1
-rw-r--r--net/hping/files/patch-bytesex.h10
-rw-r--r--net/hping/files/patch-sendip.c33
3 files changed, 40 insertions, 4 deletions
diff --git a/net/hping/Makefile b/net/hping/Makefile
index 4616be84dfe8..f8ba56c92fb8 100644
--- a/net/hping/Makefile
+++ b/net/hping/Makefile
@@ -3,6 +3,7 @@
PORTNAME= hping
PORTVERSION= 2.0.0r3
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net security
MASTER_SITES= http://www.hping.org/ \
diff --git a/net/hping/files/patch-bytesex.h b/net/hping/files/patch-bytesex.h
index 931f1127a00e..6159fea08192 100644
--- a/net/hping/files/patch-bytesex.h
+++ b/net/hping/files/patch-bytesex.h
@@ -1,15 +1,17 @@
---- bytesex.h.orig Tue Sep 14 15:22:45 2004
-+++ bytesex.h Tue Sep 14 15:21:50 2004
-@@ -8,10 +8,12 @@
+--- bytesex.h.orig 2003-07-28 17:00:55.000000000 +0800
++++ bytesex.h 2015-12-22 22:30:11.367208000 +0800
+@@ -8,10 +8,14 @@
#define ARS_BYTESEX_H
#if defined(__i386__) \
++ || defined (__amd64__) \
+ || defined(__ia64__) \
|| defined(__alpha__) \
++ || defined(__arm__) \
|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
#define BYTE_ORDER_LITTLE_ENDIAN
#elif defined(__mc68000__) \
-+ || defined (__amd64__) \
++ || (defined(__arm__) && (defined(ARMEB) || defined (__ARMEB__))) \
|| defined (__sparc__) \
|| defined (__sparc) \
|| defined (__PPC__) \
diff --git a/net/hping/files/patch-sendip.c b/net/hping/files/patch-sendip.c
new file mode 100644
index 000000000000..872861983e5a
--- /dev/null
+++ b/net/hping/files/patch-sendip.c
@@ -0,0 +1,33 @@
+--- sendip.c.orig 2003-08-01 21:28:07.000000000 +0800
++++ sendip.c 2015-12-22 23:16:39.296072000 +0800
+@@ -48,12 +48,12 @@
+ ip->ihl = (IPHDR_SIZE + optlen + 3) >> 2;
+ ip->tos = ip_tos;
+
+-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
+-/* FreeBSD */
++#if defined OSTYPE_NETBSD || defined OSTYPE_BSDI
+ /* NetBSD */
+ ip->tot_len = packetsize;
+ #else
+ /* Linux */
++/* FreeBSD */
+ /* OpenBSD */
+ ip->tot_len = htons(packetsize);
+ #endif
+@@ -73,13 +73,13 @@
+ htons((unsigned short) src_id);
+ }
+
+-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI
+-/* FreeBSD */
++#if defined OSTYPE_NETBSD | defined OSTYPE_BSDI
+ /* NetBSD */
+ ip->frag_off |= more_fragments;
+ ip->frag_off |= fragoff >> 3;
+ #else
+ /* Linux */
++/* FreeBSD */
+ /* OpenBSD */
+ ip->frag_off |= htons(more_fragments);
+ ip->frag_off |= htons(fragoff >> 3); /* shift three flags bit */