NetBSD Problem Report #22320

Received: (qmail 10451 invoked by uid 605); 31 Jul 2003 10:20:36 -0000
Message-Id: <20030731101943.467676D65C@luzon.eve>
Date: Thu, 31 Jul 2003 06:19:43 -0400 (EDT)
From: qgarnier@eve-team.com (Quentin Garnier)
Sender: gnats-bugs-owner@NetBSD.org
To: gnats-bugs@gnats.netbsd.org
Subject: Package update: hping-2.0.0.2

>Number:         22320
>Category:       pkg
>Synopsis:       Package update: hping-2.0.0.2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 31 10:21:00 +0000 2003
>Closed-Date:    Thu Sep 25 22:17:45 +0000 2003
>Last-Modified:  Thu Sep 25 22:17:45 +0000 2003
>Originator:     
>Release:        NetBSD 1.6U
>Organization:
>Environment:
System: NetBSD vidal.eve 1.6U NetBSD 1.6U (VIDAL) #9: Tue Jul 29 08:36:27 CEST 2003 root@vidal.eve:/usr/src/sys/arch/i386/compile/RE i386
Architecture: i386
Machine: i386
>Description:
	hping2-rc2 was released at an unknown date.

rc2 changes

    * Major code rewrite (me)
    * Fix for a problem about port number printing in TCP mode (thanks to
      Yann Berthier)
    * MTU value sanity check in option parsing (Nicolas Jombart)
    * Fix the use of -W option (Nicolas Jombart)
    * strlcpy() when needed (Brieuc Jeunhomme)
    * source routing and random bugfixes (Brieuc Jeunhomme)
    * Fix a bug when using BSD and a PPP link as a default route, and more
      (Nicolas Jombart)
    * --rand-source for random source addresses (me)
    * --rand-dest for random destination addresses + manpage update (me)
    * all the atoi() call was replaced with strto[u]l() (me)
    * seq/ack setting using strtoul() instead of atoi() (Shachar Shemesh)
    * DF added to the icmp and udp output (me)
    * --port ++ fixed with UDP and enanched for TCP/UDP. Now the packets
      matches only with a sport that is in the range base_dest_port -
      current_dest_port (me) (Thanks to David Bar <dbar@Checkpoint.com>
      for the original report). 

>How-To-Repeat:
>Fix:

	Mmm maybe it'd be useful to keep the comment in patch-aa.

Index: Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/hping/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	2003/07/17 22:51:14	1.2
+++ Makefile	2003/07/31 10:15:57
@@ -1,9 +1,9 @@
 # $NetBSD: Makefile,v 1.2 2003/07/17 22:51:14 grant Exp $
 #

-DISTNAME=		hping2.0.0-rc1
-PKGNAME=		hping-2.0.0.1
-WRKSRC=			${WRKDIR}/hping2
+DISTNAME=		hping2.0.0-rc2
+PKGNAME=		hping-2.0.0.2
+WRKSRC=			${WRKDIR}/hping2-rc2
 CATEGORIES=		net
 MASTER_SITES=		http://www.hping.org/

Index: distinfo
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/hping/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	2002/04/04 20:56:38	1.2
+++ distinfo	2003/07/31 10:15:57
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.2 2002/04/04 20:56:38 agc Exp $

-SHA1 (hping2.0.0-rc1.tar.gz) = 710dbc77b04399cc8979a910aa03e805c17bd01c
-Size (hping2.0.0-rc1.tar.gz) = 90496 bytes
-SHA1 (patch-aa) = 9bc0ba438d29191247d61c0b9a4e71d09e4c60a0
+SHA1 (hping2.0.0-rc2.tar.gz) = ee10aa5cce7431ab0887ca0328b0fed86407cd3c
+Size (hping2.0.0-rc2.tar.gz) = 100501 bytes
+SHA1 (patch-aa) = f0b60b33df37c5b5f332c4dd5b668c87f2f00780
 SHA1 (patch-ab) = 7862d487c5fa9940a51c82154e5427f426c93270
Index: patches/patch-aa
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/hping/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- patches/patch-aa	2002/04/04 17:02:30	1.1.1.1
+++ patches/patch-aa	2003/07/31 10:15:57
@@ -1,11 +1,8 @@
-$NetBSD: patch-aa,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $
+$NetBSD$

-Do *ALL* the root stuff right up front and then completely lose
-privileges.
-
---- main.c.orig	Mon Aug 13 20:07:33 2001
-+++ main.c	Fri Mar 29 23:46:01 2002
-@@ -150,6 +150,17 @@
+--- main.c.orig	2003-07-31 12:06:55.000000000 +0200
++++ main.c
+@@ -166,6 +166,17 @@ int main(int argc, char **argv)
  	char setflags[1024] = {'\0'};
  	int c, hdr_size;

@@ -20,20 +17,20 @@
 +		exit(1);
 +	}
 +
- 	if ( parse_options(argc, argv) == -1 )
- 	{
+ 	if (parse_options(argc, argv) == -1) {
  		printf("hping2: missing host argument\n"
-@@ -187,13 +199,6 @@
- 	{
- 		printf("using %s, addr: %s, MTU: %d\n",
+ 			"Try `hping2 --help' for more information.\n");
+@@ -206,13 +217,6 @@ int main(int argc, char **argv)
  			ifname, ifstraddr, h_if_mtu);
--	}
--
+ 	}
+ 
 -	/* open raw socket */
 -	sockraw = open_sockraw();
 -	if (sockraw == -1) {
 -		printf("[main] can't open raw socket\n");
 -		exit(1);
- 	}
- 
+-	}
+-
  	/* set SO_BROADCAST option */
+ 	socket_broadcast(sockraw);
+ 	/* set SO_IPHDRINCL option */
>Release-Note:
>Audit-Trail:

From: Marc Recht <recht@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/22320 CVS commit: pkgsrc/net/hping
Date: Thu, 25 Sep 2003 22:12:15 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	recht
 Date:		Thu Sep 25 22:12:15 UTC 2003

 Modified Files:
 	pkgsrc/net/hping: Makefile distinfo
 	pkgsrc/net/hping/patches: patch-aa

 Log Message:
 update to 2.0.0.2
 patch provided by Quentin Garnier in PR 22320

 rc2 changes
 * Major code rewrite (me)
 * Fix for a problem about port number printing in TCP mode (thanks to
   Yann Berthier)
 * MTU value sanity check in option parsing (Nicolas Jombart)
 * Fix the use of -W option (Nicolas Jombart)
 * strlcpy() when needed (Brieuc Jeunhomme)
 * source routing and random bugfixes (Brieuc Jeunhomme)
 * Fix a bug when using BSD and a PPP link as a default route, and more
   (Nicolas Jombart)
 * --rand-source for random source addresses (me)
 * --rand-dest for random destination addresses + manpage update (me)
 * all the atoi() call was replaced with strto[u]l() (me)
 * seq/ack setting using strtoul() instead of atoi() (Shachar Shemesh)
 * DF added to the icmp and udp output (me)
 * --port ++ fixed with UDP and enanched for TCP/UDP. Now the packets
   matches only with a sport that is in the range base_dest_port -
   current_dest_port (me) (Thanks to David Bar <dbar@Checkpoint.com>
   for the original report).


 To generate a diff of this commit:
 cvs rdiff -r1.2 -r1.3 pkgsrc/net/hping/Makefile pkgsrc/net/hping/distinfo
 cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/net/hping/patches/patch-aa

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: recht 
State-Changed-When: Thu Sep 25 22:17:13 UTC 2003 
State-Changed-Why:  
Commited. 
Thanks! 
>Unformatted:
 To: gnats-bugs@gnats.netbsd.org
 Subject: Package update: hping-2.0.0.2
 From: cube@cubidou.net
 Reply-To: cube@cubidou.net
 X-send-pr-version: 3.95

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.