pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/hping Update to hping2, release candidate 3



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f5ba45104b2b
branches:  trunk
changeset: 510440:f5ba45104b2b
user:      salo <salo%pkgsrc.org@localhost>
date:      Thu Mar 30 13:51:28 2006 +0000

description:
Update to hping2, release candidate 3

Changes:
- don't install hping suid root by default, add "hping-suid" option.
- add bunch on patches from Pavel Kankovsky <peak at argo.troja.mff.cuni.cz>
  namely: add --flood and --tcp-mss options (self-explanatory), some checksum
  and interface binding fixes and warning fixes

2.0.0rc3:
=======
FIX: Fix for interface guessing with aliases on BSD
     Thanks <michel.gravey(@)orange.fr> and <cognet(@)freebsd.org>
FIX: fixed cksum.c. Bad outgoing packet checksum with some packet.
     Thanks to Brett Eldridge <beldridg%pobox.com@localhost>.
ADD: scan mode (--scan)
ADD: A rc4-based PRNG to use with --rand-source and --rand-dest
FIX: Fix -I option for BSD/Apple
ADD: Add support for BSDI and MacOSX (thanks
     Dennis Opacki <dopacki%adotout.com@localhost> and Jan-Hinrich Fessel
     <Jan-Hinrich.Fessel%T-Mobile.de@localhost>)
ADD: A few useful ICMP options
ADD: Add support for :
     WLAN (Fabian Melzow <biop0b%web.de@localhost>)
     ATM (Debian bug #193436, thanks to Domenico Andreoli)
     Token Ring (jim.r.halfpenny%britishairways.com@localhost)
ADD: MacOSX patches (Hans-Joachim Knobloch <knobloch%secorvo.de@localhost>)
FIX: --rand-source patches from Quentin Garnier <hping%quatriemek.com@localhost>
     . ensure randomness
     . do not stop on errors when using a E or D class address (BSD only?)

diffstat:

 net/hping/MESSAGE          |   6 ---
 net/hping/Makefile         |  14 +++---
 net/hping/distinfo         |  26 +++++++++----
 net/hping/options.mk       |  11 ++++++
 net/hping/patches/patch-aa |  50 ++++++++++++++++++++++++--
 net/hping/patches/patch-ab |  57 +++++++++++++++++++++++++------
 net/hping/patches/patch-ad |  11 ++---
 net/hping/patches/patch-ae |  34 +++++++++---------
 net/hping/patches/patch-af |  78 +++++++++++++++++++++++++++++++++++++++++++
 net/hping/patches/patch-ag |  83 ++++++++++++++++++++++++++++++++++++++++++++++
 net/hping/patches/patch-ah |  34 ++++++++++++++++++
 net/hping/patches/patch-ai |  30 ++++++++++++++++
 net/hping/patches/patch-aj |  24 +++++++++++++
 net/hping/patches/patch-ak |  47 ++++++++++++++++++++++++++
 net/hping/patches/patch-al |  21 +++++++++++
 net/hping/patches/patch-am |  58 ++++++++++++++++++++++++++++++++
 net/hping/patches/patch-an |  44 ++++++++++++++++++++++++
 net/hping/patches/patch-ao |  13 +++++++
 18 files changed, 581 insertions(+), 60 deletions(-)

diffs (truncated from 776 to 300 lines):

diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/MESSAGE
--- a/net/hping/MESSAGE Thu Mar 30 13:39:39 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $
-
-       NOTE: ${PREFIX}/sbin/hping (and hping2) are setuid "root".
-
-===========================================================================
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/Makefile
--- a/net/hping/Makefile        Thu Mar 30 13:39:39 2006 +0000
+++ b/net/hping/Makefile        Thu Mar 30 13:51:28 2006 +0000
@@ -1,27 +1,27 @@
-# $NetBSD: Makefile,v 1.7 2005/12/05 20:50:46 rillig Exp $
+# $NetBSD: Makefile,v 1.8 2006/03/30 13:51:28 salo Exp $
 #
 
-DISTNAME=              hping2.0.0-rc2
-PKGNAME=               hping-2.0.0.2
+DISTNAME=              hping2.0.0-rc3
+PKGNAME=               hping-2.0.0.3
 CATEGORIES=            net
 MASTER_SITES=          http://www.hping.org/
 
 MAINTAINER=            atatat%NetBSD.org@localhost
 HOMEPAGE=              http://www.hping.org/
-COMMENT=               Traceroute and ping using TCP and UDP as well as ICMP
+COMMENT=               Command-line oriented TCP/IP packet assembler/analyzer
 
-WRKSRC=                        ${WRKDIR}/hping2-rc2
+WRKSRC=                        ${WRKDIR}/hping2-rc3
 HAS_CONFIGURE=         YES
 MANPATH=               ${PREFIX}/man
 CONFIGURE_ENV+=                MANPATH=${MANPATH:Q}
-NOT_FOR_PLATFORM=      NetBSD-0.*-* NetBSD-1.[0-4]*-*
 
-BINMODE=               4755
 INSTALLATION_DIRS=     man/man8 sbin
 
 CONFIGURE_ENV+=                PCAPINCDIR=${BUILDLINK_PREFIX.libpcap}/include
 CONFIGURE_ENV+=                PCAPLIBDIR=${BUILDLINK_PREFIX.libpcap}/lib
 
+.include "options.mk"
+
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/hping2 ${PREFIX}/sbin
        ${LN} -s ../sbin/hping2 ${PREFIX}/sbin/hping
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/distinfo
--- a/net/hping/distinfo        Thu Mar 30 13:39:39 2006 +0000
+++ b/net/hping/distinfo        Thu Mar 30 13:51:28 2006 +0000
@@ -1,10 +1,20 @@
-$NetBSD: distinfo,v 1.6 2006/03/14 02:29:11 joerg Exp $
+$NetBSD: distinfo,v 1.7 2006/03/30 13:51:28 salo Exp $
 
-SHA1 (hping2.0.0-rc2.tar.gz) = ee10aa5cce7431ab0887ca0328b0fed86407cd3c
-RMD160 (hping2.0.0-rc2.tar.gz) = e32479f8d1f7408eaeaa9e507c8050618c81825e
-Size (hping2.0.0-rc2.tar.gz) = 100501 bytes
-SHA1 (patch-aa) = f0b60b33df37c5b5f332c4dd5b668c87f2f00780
-SHA1 (patch-ab) = 7862d487c5fa9940a51c82154e5427f426c93270
+SHA1 (hping2.0.0-rc3.tar.gz) = ec48293ca25e08155bf4b51ad6140b1be576a16f
+RMD160 (hping2.0.0-rc3.tar.gz) = 345c6b29e48c2f9aea6b8bafb68c258f9ff8b083
+Size (hping2.0.0-rc3.tar.gz) = 124573 bytes
+SHA1 (patch-aa) = 651a2dad60439e19a5815909ef6e857c9d6cde86
+SHA1 (patch-ab) = 062bc2405c76d0c550a4750c3ffb8def236dc06d
 SHA1 (patch-ac) = b39369c28ca8932f13d9500509b84e28a1db6058
-SHA1 (patch-ad) = 0229fb92f51ec3884a8e16ff9487fd5cfa238f1c
-SHA1 (patch-ae) = 42d25825134ce41a84122d5effc67973c10b37f4
+SHA1 (patch-ad) = 292d9807ca7af37a70d1901bd614c00662ae9a74
+SHA1 (patch-ae) = db7634c10680a8729ffdcace4fd7abb676140b5d
+SHA1 (patch-af) = 1099dc70a7053e6c7bead73445b3748d3798cfef
+SHA1 (patch-ag) = 60b3e784c18f0a1c5a84af401dbc59b9e81f9d3d
+SHA1 (patch-ah) = fe763d1f21f744b950f62ca062fbf8bd4a7e00f3
+SHA1 (patch-ai) = af2d948240101f264c1fb97eedd4417fd3bf8d6a
+SHA1 (patch-aj) = 8143a56a7fa28f7985b08d4dcf752153dc8d9edf
+SHA1 (patch-ak) = 1021be12c2ceb7b9a1b428dd9f928c28f1f0f8b7
+SHA1 (patch-al) = d27e28938e731952e8bceb642c3441a4741f0b3d
+SHA1 (patch-am) = 9f71209f239c34e9be54e34505cbbd0a5da92cb2
+SHA1 (patch-an) = 4b2a4b7b7b3b4a206d8cadf2ab62c703059b7d7d
+SHA1 (patch-ao) = 139cc79d5473c46b838a1f70d06595f598398f17
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping/options.mk      Thu Mar 30 13:51:28 2006 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: options.mk,v 1.1 2006/03/30 13:51:28 salo Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.hping
+PKG_SUPPORTED_OPTIONS= hping-suid
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mhping-suid)
+BINOWN=                        root
+BINMODE=               4511
+.endif
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/patches/patch-aa
--- a/net/hping/patches/patch-aa        Thu Mar 30 13:39:39 2006 +0000
+++ b/net/hping/patches/patch-aa        Thu Mar 30 13:51:28 2006 +0000
@@ -1,8 +1,34 @@
-$NetBSD: patch-aa,v 1.2 2003/09/25 22:12:15 recht Exp $
+$NetBSD: patch-aa,v 1.3 2006/03/30 13:51:29 salo Exp $
 
---- main.c.orig        2003-07-31 12:06:55.000000000 +0200
-+++ main.c
-@@ -166,6 +166,17 @@ int main(int argc, char **argv)
+--- main.c.orig        2003-08-08 01:55:55.000000000 +0200
++++ main.c     2005-11-05 21:45:04.000000000 +0100
+@@ -47,7 +47,8 @@
+       signlen,
+       lsr_length = 0,
+       ssr_length = 0,
+-      tcp_ack;
++      tcp_ack,
++      tcp_mss;
+ 
+ 
+ unsigned short int
+@@ -65,6 +66,7 @@
+       recv_pkt = 0,
+       out_of_sequence_pkt = 0,
+       sending_wait = DEFAULT_SENDINGWAIT,     /* see DEFAULT_SENDINGWAIT */
++      opt_flood       = FALSE,
+       opt_rawipmode   = FALSE,
+       opt_icmpmode    = FALSE,
+       opt_udpmode     = FALSE,
+@@ -98,6 +100,7 @@
+       opt_tcpexitcode = FALSE,
+       opt_badcksum    = FALSE,
+       opt_tr_keep_ttl = FALSE,
++      opt_tcp_mss     = FALSE,
+       opt_tcp_timestamp = FALSE,
+       opt_tr_stop     = FALSE,
+       opt_tr_no_rtt   = FALSE,
+@@ -179,6 +182,17 @@
        char setflags[1024] = {'\0'};
        int c, hdr_size;
  
@@ -20,7 +46,7 @@
        if (parse_options(argc, argv) == -1) {
                printf("hping2: missing host argument\n"
                        "Try `hping2 --help' for more information.\n");
-@@ -206,13 +217,6 @@ int main(int argc, char **argv)
+@@ -219,13 +233,6 @@
                        ifname, ifstraddr, h_if_mtu);
        }
  
@@ -34,3 +60,17 @@
        /* set SO_BROADCAST option */
        socket_broadcast(sockraw);
        /* set SO_IPHDRINCL option */
+@@ -355,6 +362,13 @@
+               }
+       }
+ 
++      /* flood mode */
++      if (opt_flood) {
++              printf("Flooding...\n");
++              for (;;)
++                      send_packet(0 /* dummy */);
++      }
++
+       /* start packet sending */
+       kill(getpid(), SIGALRM);
+ 
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/patches/patch-ab
--- a/net/hping/patches/patch-ab        Thu Mar 30 13:39:39 2006 +0000
+++ b/net/hping/patches/patch-ab        Thu Mar 30 13:51:28 2006 +0000
@@ -1,15 +1,50 @@
-$NetBSD: patch-ab,v 1.1 2002/04/04 20:56:39 agc Exp $
-
-hping needs to run as root, even for -v. For non-root builds, comment this part out.
+$NetBSD: patch-ab,v 1.2 2006/03/30 13:51:29 salo Exp $
 
---- Makefile.in        2002/04/04 20:54:28     1.1
-+++ Makefile.in        2002/04/04 20:54:42
-@@ -35,7 +35,7 @@
+--- Makefile.in.orig   2004-05-03 11:29:39.000000000 +0200
++++ Makefile.in        2005-11-05 21:07:50.000000000 +0100
+@@ -6,14 +6,14 @@
+ # $date: Sun Jul 25 17:56:15 MET DST 1999$ 
+ # $rev: 3$ 
+ 
+-CC= gcc
+-AR=/usr/bin/ar
+-RANLIB=/usr/bin/ranlib
+-CCOPT= -O2 -Wall @PCAP_INCLUDE@
+-DEBUG= -g
++#CC= gcc
++#AR=/usr/bin/ar
++#RANLIB=/usr/bin/ranlib
++#CCOPT= -O2 -Wall @PCAP_INCLUDE@
++#DEBUG= -g
+ #uncomment the following if you need libpcap based build under linux
+ #(not raccomanded)
+-COMPILE_TIME= @FORCE_LIBPCAP@
++#COMPILE_TIME= @FORCE_LIBPCAP@
+ INSTALL_MANPATH=@MANPATH@
+ @PCAP@
+ 
+@@ -39,21 +39,17 @@
+ all: hping2
+ 
+ libars.a: $(ARSOBJ)
+-      $(AR) rc $@ $^
++      $(AR) rc $@ $>
+       $(RANLIB) $@
+ 
  hping2: byteorder.h $(OBJ)
-       $(CC) -o hping2 $(CCOPT) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@
-       @echo
+-      $(CC) -o hping2 $(CCOPT) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@
+-      @echo
 -      ./hping2 -v
-+      #./hping2 -v
-       @echo "use \`make strip' to strip hping2 binary"
-       @echo "use \`make install' to install hping2"
+-      @echo "use \`make strip' to strip hping2 binary"
+-      @echo "use \`make install' to install hping2"
++      $(CC) -o hping2 $(LDFLAGS) $(OBJ) $(PCAP) @SOLARISLIB@
+ 
+ byteorder.h:
+       ./configure
  
+ .c.o:
+-      $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
++      $(CC) -c $(CFLAGS) $<
+ 
+ clean:
+       rm -rf hping2 *.o *.a
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/patches/patch-ad
--- a/net/hping/patches/patch-ad        Thu Mar 30 13:39:39 2006 +0000
+++ b/net/hping/patches/patch-ad        Thu Mar 30 13:51:28 2006 +0000
@@ -1,14 +1,13 @@
-$NetBSD: patch-ad,v 1.2 2006/03/14 02:29:11 joerg Exp $
+$NetBSD: patch-ad,v 1.3 2006/03/30 13:51:29 salo Exp $
 
---- libpcap_stuff.c.orig       2001-08-23 18:49:39.000000000 +0000
-+++ libpcap_stuff.c
-@@ -15,8 +15,11 @@
- #include <stdio.h>
+--- libpcap_stuff.c.orig       2002-12-13 15:07:07.000000000 +0100
++++ libpcap_stuff.c    2006-03-22 19:54:51.000000000 +0100
+@@ -16,8 +16,10 @@
+ #include <string.h>
  #include <stdlib.h>
  #include <sys/ioctl.h>
 -#include <pcap.h>
 +#include <sys/time.h>
-+#include <string.h>
  #include <net/bpf.h>
 +#define PCAP_DONT_INCLUDE_PCAP_BPF_H
 +#include <pcap.h>
diff -r 1af651cbc0ef -r f5ba45104b2b net/hping/patches/patch-ae
--- a/net/hping/patches/patch-ae        Thu Mar 30 13:39:39 2006 +0000
+++ b/net/hping/patches/patch-ae        Thu Mar 30 13:51:28 2006 +0000
@@ -1,31 +1,31 @@
-$NetBSD: patch-ae,v 1.1 2006/03/14 02:29:11 joerg Exp $
+$NetBSD: patch-ae,v 1.2 2006/03/30 13:51:29 salo Exp $
 
---- getifname.c.orig   2006-03-14 02:23:00.000000000 +0000
-+++ getifname.c
-@@ -15,7 +15,7 @@
- #include <net/if.h>
+--- getifname.c.orig   2004-05-03 10:55:53.000000000 +0200
++++ getifname.c        2006-03-22 19:56:40.000000000 +0100
+@@ -17,7 +17,7 @@
  #include <unistd.h>           /* close */
  
--#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
+-    defined(__bsdi__) || defined(__APPLE__)
++    defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
  #include <stdlib.h>
  #include <ifaddrs.h>
- #endif /* defined(__*BSD__) */
-@@ -23,7 +23,7 @@
- #include "hping2.h"
- #include "globals.h"
+ #include <net/route.h>
+@@ -28,7 +28,7 @@
  
--#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__linux__) && !defined(__sun__)
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__linux__) && !defined(__sun__) && !defined(__DragonFly__)
+ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \
+     !defined(__linux__) && !defined(__sun__) && !defined(__bsdi__) && \
+-    !defined(__APPLE__)
++    !defined(__APPLE__) && !defined(__DragonFly__)
  #error Sorry, interface code not implemented.
  #endif
  
-@@ -169,7 +169,7 @@ int get_if_name(void)
-       return 0;
+@@ -175,7 +175,7 @@
  }
  
--#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
+-      defined(__bsdi__) || defined(__APPLE__)



Home | Main Index | Thread Index | Old Index