svn commit: r404246 - in head/net: hping hping-devel hping-devel/files hping/files
Kevin Lo
kevlo at FreeBSD.org
Tue Dec 22 15:51:03 UTC 2015
Author: kevlo
Date: Tue Dec 22 15:51:01 2015
New Revision: 404246
URL: https://svnweb.freebsd.org/changeset/ports/404246
Log:
- Fix the error "[send_ip] sendto: Invalid argument"; ip_len and ip_tos must be provided in host byte order.
- Fix build with arm
Added:
head/net/hping-devel/files/patch-sendip.c (contents, props changed)
head/net/hping/files/patch-sendip.c (contents, props changed)
Modified:
head/net/hping-devel/Makefile
head/net/hping-devel/files/patch-bytesex.h
head/net/hping/Makefile
head/net/hping/files/patch-bytesex.h
Modified: head/net/hping-devel/Makefile
==============================================================================
--- head/net/hping-devel/Makefile Tue Dec 22 15:48:26 2015 (r404245)
+++ head/net/hping-devel/Makefile Tue Dec 22 15:51:01 2015 (r404246)
@@ -2,6 +2,7 @@
PORTNAME= hping
PORTVERSION= 3.0.20051105
+PORTREVISION= 1
CATEGORIES= net security
MASTER_SITES= http://www.hping.org/ \
http://200ok.org/distfiles/hping/
Modified: head/net/hping-devel/files/patch-bytesex.h
==============================================================================
--- head/net/hping-devel/files/patch-bytesex.h Tue Dec 22 15:48:26 2015 (r404245)
+++ head/net/hping-devel/files/patch-bytesex.h Tue Dec 22 15:51:01 2015 (r404246)
@@ -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__) \
Added: head/net/hping-devel/files/patch-sendip.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/hping-devel/files/patch-sendip.c Tue Dec 22 15:51:01 2015 (r404246)
@@ -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 */
Modified: head/net/hping/Makefile
==============================================================================
--- head/net/hping/Makefile Tue Dec 22 15:48:26 2015 (r404245)
+++ head/net/hping/Makefile Tue Dec 22 15:51:01 2015 (r404246)
@@ -3,6 +3,7 @@
PORTNAME= hping
PORTVERSION= 2.0.0r3
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net security
MASTER_SITES= http://www.hping.org/ \
Modified: head/net/hping/files/patch-bytesex.h
==============================================================================
--- head/net/hping/files/patch-bytesex.h Tue Dec 22 15:48:26 2015 (r404245)
+++ head/net/hping/files/patch-bytesex.h Tue Dec 22 15:51:01 2015 (r404246)
@@ -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__) \
Added: head/net/hping/files/patch-sendip.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/hping/files/patch-sendip.c Tue Dec 22 15:51:01 2015 (r404246)
@@ -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 */
More information about the svn-ports-all
mailing list