From nobody Tue Mar 14 15:58:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PbdV41lSYz3yQPT; Tue, 14 Mar 2023 15:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PbdV41KQXz4FRM; Tue, 14 Mar 2023 15:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678809500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IIDDDsW8cKP4ZyGjNSAf6FDsJuAK/ncZtuvKTWFP8Q=; b=dBXFDAU6NCYXjyA8fbe24WSaVZvvNxzmUclA+wgXVyb3FFDUUFDxmBCkrt+KsuIaA2MwM5 +FXzvf07FU/2Lr/L5/VFSRCS+k3TlHtOLUBN43hjJ4zm+ty8LuyHiV1wP49nbWpQW7qV/8 kLWXsNSV1/ejCCsNRvNEWVacAf0a1FW982zvvfm3vLg7i77mYlJGaQXpJRFtuFzWnj+/9O g6Bb3/L0P+GFsIy5YJOMhUWFUOl8stbpvV+cEZ6EVPgmho1iIz7sm5WHxAfmNtwy/WpJZT sEOyDkQllHSZmiUvupr2yhayU5SW9ArOXL/EyW+NPd/KjA0xqPVobTDRHfOSOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678809500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IIDDDsW8cKP4ZyGjNSAf6FDsJuAK/ncZtuvKTWFP8Q=; b=epT8mLt0+Yni6x3FTejIOIQuBPux4Vv4clEzaXXSve3cy+XMewcMsyQwCiz9TmLlnXLIWz SlOeI5uEq28a5a+Hi6MvKxQouvCZK9WWxqVwEuCVbPh6ahr2nJ9H1UZYArxztMSR0iogw9 QyzFhq7+fAYlxIeO6bDeZTIFMmGqK+o7pmndUYXFkSD6oSKN6QFs/RSVkqZCmDlFG233lQ Pew/jImTf9UEErF58sFxqhdp4D7blNaT5ZgAJ49d6QtwL2gA0sxCc656fGjxM6yaFKsWpH PBsEuyl8CfV6j9I0/cEfhhUQ9fuUkEknLwEoUjSYeVGH69WLmwzg3qAAvHybFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678809500; a=rsa-sha256; cv=none; b=Gi8bjG9uFJIYJWTqDZFXWvhlNjgK2aY9/fmYWiqWDRtpVr4taOvHfjaSNNOvjgvszbauGQ OS00wefEINydBbp7rZNshUTOFGmCZssm8D8mf9pWMSS+OtZKkYMO39fQuVEsCaVNnEOzCH dANJV/Z3wsNYTZuJ287CDDZasjBEGOtF8tgDWRkK8AqV9PxHPOD0zu+nq0kMekU4RfbV3G mpae+C/nwDYdibxAL6Z5jqYHTW+DmyWMOJvKQz5TZ8QiBImqeaEBJIuOzypmbLqQthUmvq HUGe+w+G0gVeP/v4hZH8unu/dmru2aGxdNVYwbqrNRczjkOqs2RiOKnN5/avWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PbdV40R9lzh18; Tue, 14 Mar 2023 15:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32EFwJR8007950; Tue, 14 Mar 2023 15:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32EFwJOB007949; Tue, 14 Mar 2023 15:58:19 GMT (envelope-from git) Date: Tue, 14 Mar 2023 15:58:19 GMT Message-Id: <202303141558.32EFwJOB007949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6d33121337af - main - ping: Remove ifndef icmp_data guards List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d33121337af8b8ddfe3c44c8a3dba4db1529787 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d33121337af8b8ddfe3c44c8a3dba4db1529787 commit 6d33121337af8b8ddfe3c44c8a3dba4db1529787 Author: Jose Luis Duran AuthorDate: 2023-03-14 15:22:33 +0000 Commit: Mark Johnston CommitDate: 2023-03-14 15:58:03 +0000 ping: Remove ifndef icmp_data guards Early versions of [1] did not have icmp_data defined, but FreeBSD has always had. Remove these guards. NetBSD [2] and OpenBSD [3] have already removed them. [1]: https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/netinet/ip_icmp.h [2]: https://github.com/NetBSD/src/commit/203dfd34867991fd002f747d74a96f26ae80d41c [3]: https://github.com/openbsd/src/commit/d83449c83c03b86e72d642dc92bcea434310435a Reviewed by: markj MFC after: 1 week --- sbin/ping/ping.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 00026c33a479..6e069adfecfa 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1189,12 +1189,8 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) return; } -#ifndef icmp_data - icmp_data_raw = buf + hlen + offsetof(struct icmp, icmp_ip); -#else icmp_data_raw_len = cc - (hlen + offsetof(struct icmp, icmp_data)); icmp_data_raw = buf + hlen + offsetof(struct icmp, icmp_data); -#endif /* Now the ICMP part */ cc -= hlen;