Subject: Re: CVS commit: src/sbin
To: None <itojun@netbsd.org>
From: Klaus Klein <kleink@reziprozitaet.de>
List: source-changes
Date: 04/22/2004 09:58:09
On Thursday 22 April 2004 03:39, Jun-ichiro itojun Hagino wrote:
> Module Name:	src
> Committed By:	itojun
> Date:		Thu Apr 22 01:39:20 UTC 2004
>
> Modified Files:
> 	src/sbin/ping: ping.c
> 	src/sbin/ping6: ping6.c
>
> Log Message:
> do not disclose endian.   henning@openbsd
>
>
> To generate a diff of this commit:
> cvs rdiff -r1.75 -r1.76 src/sbin/ping/ping.c
> cvs rdiff -r1.57 -r1.58 src/sbin/ping6/ping6.c

This made me a little curious, since you recently propagated,
at my request, this functionality (actually as part of avoiding
struct timeval on the wire) from traceroute6 into ping.c rev.
1.75.  ping6.c has been doing so since rev. 1.41.

In all these cases, today's relevant changes boil down to:

@@ -459,7 +459,7 @@
                        opack_icmp.icmp_data[i] = i;
        }

-       ident = htons(getpid()) & 0xFFFF;
+       ident = htons(arc4random() & 0xFFFF);

        if ((s = cap_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) < 0)
                err(1, "Cannot create socket");

In particular, traceroute6's log is a little better, but it now reads:

revision 1.35
date: 2004/04/22 01:41:22;  author: itojun;  state: Exp;  lines: +4 -3
do not disclose endian/pid.  henning@openbsd
----------------------------
revision 1.34
date: 2004/01/25 03:26:30;  author: itojun;  state: Exp;  lines: +38 -58
do not disclose endian/alignment by probe packet.   from dreaadt@openbsd
via kame
----------------------------


I won't take a position about the change itself, but what I do ask you
is to leave behind accurate and non-misleading log messages.  Thank you.



- Klaus