Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/6555431eb362
branches:  netbsd-7-0
changeset: 801317:6555431eb362
user:      snj <snj%NetBSD.org@localhost>
date:      Fri May 12 05:21:43 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 a546fa636c28 -r 6555431eb362 sbin/ping/ping.c
--- a/sbin/ping/ping.c  Fri May 12 05:09:47 2017 +0000
+++ b/sbin/ping/ping.c  Fri May 12 05:21:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping.c,v 1.107.4.1.2.1 2016/12/18 08:40:54 snj Exp $   */
+/*     $NetBSD: ping.c,v 1.107.4.1.2.2 2017/05/12 05:21:43 snj Exp $   */
 
 /*
  * Copyright (c) 1989, 1993
@@ -58,7 +58,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.107.4.1.2.1 2016/12/18 08:40:54 snj Exp $");
+__RCSID("$NetBSD: ping.c,v 1.107.4.1.2.2 2017/05/12 05:21:43 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