Module Name: src Committed By: snj Date: Fri May 12 05:20:27 UTC 2017
Modified Files: src/sbin/ping [netbsd-7]: ping.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.107.4.2 -r1.107.4.3 src/sbin/ping/ping.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/ping/ping.c diff -u src/sbin/ping/ping.c:1.107.4.2 src/sbin/ping/ping.c:1.107.4.3 --- src/sbin/ping/ping.c:1.107.4.2 Sun Dec 18 08:22:28 2016 +++ src/sbin/ping/ping.c Fri May 12 05:20:27 2017 @@ -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 @@ pinger(void) 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)