do not disclose endian/pid. henning@openbsd
This commit is contained in:
parent
56ae6a5d4c
commit
2a4c071a4f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: traceroute.c,v 1.60 2004/01/05 23:23:39 jmmv Exp $ */
|
||||
/* $NetBSD: traceroute.c,v 1.61 2004/04/22 01:41:22 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
|
||||
|
@ -29,7 +29,7 @@ static const char rcsid[] =
|
|||
#else
|
||||
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
__RCSID("$NetBSD: traceroute.c,v 1.60 2004/01/05 23:23:39 jmmv Exp $");
|
||||
__RCSID("$NetBSD: traceroute.c,v 1.61 2004/04/22 01:41:22 itojun Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -614,7 +614,7 @@ main(int argc, char **argv)
|
|||
outip->ip_dst = to->sin_addr;
|
||||
|
||||
outip->ip_hl = (outp - (u_char *)outip) >> 2;
|
||||
ident = (getpid() & 0xffff) | 0x8000;
|
||||
ident = htons(arc4random() & 0xffff) | 0x8000;
|
||||
if (useicmp) {
|
||||
outip->ip_p = IPPROTO_ICMP;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: traceroute6.c,v 1.34 2004/01/25 03:26:30 itojun Exp $ */
|
||||
/* $NetBSD: traceroute6.c,v 1.35 2004/04/22 01:41:22 itojun Exp $ */
|
||||
/* $KAME: traceroute6.c,v 1.67 2004/01/25 03:24:39 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -75,7 +75,7 @@ static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) 6/6/93";
|
|||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: traceroute6.c,v 1.34 2004/01/25 03:26:30 itojun Exp $");
|
||||
__RCSID("$NetBSD: traceroute6.c,v 1.35 2004/04/22 01:41:22 itojun Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -467,7 +467,8 @@ main(argc, argv)
|
|||
break;
|
||||
case 'I':
|
||||
useicmp++;
|
||||
ident = htons(getpid() & 0xffff); /* same as ping6 */
|
||||
/* same as ping6 */
|
||||
ident = htons(arc4random() & 0xffff);
|
||||
break;
|
||||
case 'l':
|
||||
lflag++;
|
||||
|
|
Loading…
Reference in New Issue