From nobody Sun Mar 17 15:26:55 2024 X-Original-To: dev-commits-src-branches@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 4TyMKW4sLsz5DZP1; Sun, 17 Mar 2024 15:26:55 +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 4TyMKW4RQFz3wsd; Sun, 17 Mar 2024 15:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710689215; 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=u+3hPU9tpJfYVczA1xTTRVwix+9ePYY45caASqjfeq8=; b=MgB5NpYeod9momX4CpRZfe8QxuKCxlXyUr2Qnr7EbvzL7+2FuLs5fouZ195nIcMCPNQ2DO nnizy4cI24vXVEy39nvqfSO+Fvm8jv5ZMMT0dwKOqHzWFmhkMY6gYCXJWJmFUZ/g+SFDcd g7zFTY3kMoSiHlbbeozPzDi34XFea6Yi23CyFve93dh+uFIC9nxmyeORA282cQg3ZgY71t hWKYA9LwCM0/hg+sBTmJk7oghZGNst0feNWF8YdqJke2GbPN11L8jLb0KGcvJPlWhLqgLW HztvU0CgP06bcKvsHvuI4gNyARj49+lsqSTuyDyvrhfn+RKMNFD2LJIx4O06MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710689215; a=rsa-sha256; cv=none; b=wAcRhv38mK7RSIkaF9AqslhaeE+OwpTdu/rpCq85m0OzbXpEXO/P/ShnCl9WLv+6S/rtGg L4DCStqfIVeRuf8D6ETR1RELAM6ZzabAvURRBaY7JKdqGegKnLRUAONkX1CxLCW0/lw21B 0gkUQMy5hc3nJGcKxJxT5o0CYju4Da7oXhXz/fRpyF0s+ke6fVM5rmFcguqiA8XIWYgRB9 brtth3Z95f6lrVvVFdBQdWrDbOgiNUTY17D3g/MnNkh4M+ZszPfDKAJDkPzpsUY7UeXsc7 0BfqRRpO9D92609x7QGJQHkhk+jL+MG23ADqMD6Vo0owOTnTJCIBftUfB9xOfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710689215; 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=u+3hPU9tpJfYVczA1xTTRVwix+9ePYY45caASqjfeq8=; b=E5fc4RIzAhwzQvBpJWwZfzU9w4u8rvyfJb+aujGpCnhuMCuXad+oRM5k7nh77J/Yl8r4m2 K7gYsUmPvrg52tu0P1KPM9xbmBXzUXbB/0tn+ipkJgFcI6Ouf57a6rdoJpstwLlGJT6+YD boXkqCLNImNAAIT7h53uGRju6OVgQCbytYisr3o4o7unKcbDUkLDK+hwrjuIxN912QCfrB rWgeGLUgOvxKKiH6cm8/WbHhWjGMYftFscqqbmjs21WnbByCPE9j6x+d/0n+VObiDk4dbP ioGJwb2xi7dJsBBveb41YyoChiz8ZifMOnCYyvPPV2W45u2JeAfCIA3VNxj1wg== 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 4TyMKW3wsBzkbB; Sun, 17 Mar 2024 15:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42HFQtfk014825; Sun, 17 Mar 2024 15:26:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42HFQtdm014822; Sun, 17 Mar 2024 15:26:55 GMT (envelope-from git) Date: Sun, 17 Mar 2024 15:26:55 GMT Message-Id: <202403171526.42HFQtdm014822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c3f4736f049c - stable/14 - ping: Fix protocol selection with NOINET6 kernel. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3f4736f049cc469f081a5879097e391a56c728b Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c3f4736f049cc469f081a5879097e391a56c728b commit c3f4736f049cc469f081a5879097e391a56c728b Author: Dag-Erling Smørgrav AuthorDate: 2024-03-12 19:40:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-17 14:38:12 +0000 ping: Fix protocol selection with NOINET6 kernel. A missing else caused the correct resolver hint (AF_INET) to be overwritten with AF_UNSPEC when the kernel supports IPv4 but not IPv6. MFC after: 3 days PR: 277592 Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44304 (cherry picked from commit b53ae8a8333d730bb977276c511743b98c881423) --- sbin/ping/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 65896a5dba7b..eb8065cf8309 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -150,7 +150,7 @@ main(int argc, char *argv[]) hints.ai_socktype = SOCK_RAW; if (feature_present("inet") && !feature_present("inet6")) hints.ai_family = AF_INET; - if (feature_present("inet6") && !feature_present("inet")) + else if (feature_present("inet6") && !feature_present("inet")) hints.ai_family = AF_INET6; else hints.ai_family = AF_UNSPEC;