Source-Changes-HG archive

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

[src/netbsd-7]: src/sbin/ping Pull up following revision(s) (requested by ryo...



details:   https://anonhg.NetBSD.org/src/rev/e567ff426e11
branches:  netbsd-7
changeset: 800204:e567ff426e11
user:      snj <snj%NetBSD.org@localhost>
date:      Fri May 12 05:20:27 2017 +0000

description:
Pull up following revision(s) (requested by ryo in ticket #1390):
        sbin/ping/ping.c: revision 1.116
Fix cksum calculation for clearing the cached route.
In ping.c:r1.104, the size of echoreply packet was changed to ICMP_MINLEN,
Therefore also calculation size must be ICMP_MINLEN.

diffstat:

 sbin/ping/ping.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f847c6802eb6 -r e567ff426e11 sbin/ping/ping.c
--- a/sbin/ping/ping.c  Fri May 12 05:17:40 2017 +0000
+++ b/sbin/ping/ping.c  Fri May 12 05:20:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping.c,v 1.107.4.2 2016/12/18 08:22:28 snj Exp $       */
+/*     $NetBSD: ping.c,v 1.107.4.3 2017/05/12 05:20:27 snj Exp $       */
 
 /*
  * Copyright (c) 1989, 1993
@@ -58,7 +58,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.107.4.2 2016/12/18 08:22:28 snj Exp $");
+__RCSID("$NetBSD: ping.c,v 1.107.4.3 2017/05/12 05:20:27 snj Exp $");
 #endif
 
 #include <stdio.h>
@@ -883,7 +883,7 @@
                opack_icmp.icmp_id = ~ident;
                opack_icmp.icmp_cksum = 0;
                opack_icmp.icmp_cksum = in_cksum((u_int16_t *)&opack_icmp,
-                   phdrlen);
+                   ICMP_MINLEN);
                sw = 0;
                if (prog_setsockopt(sloop, IPPROTO_IP, IP_HDRINCL,
                               (char *)&sw, sizeof(sw)) < 0)



Home | Main Index | Thread Index | Old Index