From nobody Tue Mar 07 14:46:56 2023 X-Original-To: dev-commits-src-main@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 4PWJDw6YRLz3wF3y; Tue, 7 Mar 2023 14:46:56 +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 4PWJDw65Swz449v; Tue, 7 Mar 2023 14:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678200416; 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=5sFyASzWHcYUUNG3FKUSvhBTykAIrStNggABLz6vRU0=; b=sz/ZCetxVhxiWQxuWSy4RhCbUezwIBJ+a7m0jpHdvVRqkAQkq4nD6hgy2Ft2Kgrlh21QD+ VTAZJA/puDk1JBbUodtEobWiBMYnkYzgIaK90lCt7S3FpVlhWV85+IhN7AsP1Ueu8ggHb5 NXJSMucmZFCea1Hd+178/HSJtM9/wbS4lewXVFJyR18MxWrlOqk2SmpwRu7CxQEF7e11NR bP7AA/2Roe4b4S2LX81EAgtk/WrsZ1w7xHezSuw9yxGr6jPAmrLjoSVCsG86bAvuH5tyTw UkzMm7gsSM38wSOYvRJRTh1Rw4tNEu/cirqGaSy0w3iH4KWnlnYp5bFJZyMmAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678200416; 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=5sFyASzWHcYUUNG3FKUSvhBTykAIrStNggABLz6vRU0=; b=Jj6gawY//rul0lM+wLtl1JTk2mADjNRkAPgDVffW+g6jrP9xr7vYLmfCgf3wkDkp0M9+MZ V7eiCTT3L5hxDvCKqiLnjNAM8NjRSBaXX9s8b8SfaH2AXPTLrgUultdmwj5tjSICkNfKKV rAJyWBkLdeLau4AYekZQLhvqkeviUBR9YpVA/MakG+mFg6g2rHgifwB41ebs6SMhk4qNox 9hkqFPSLKpVYKVXKRRt+NkXR/Qn4mCCenmXK6NroGt0pSu/mszzPOc81UyfWIeu+4Xmds/ 01tsvCLQLBnExkbuOpK0gFyW0q1mgole6CxOqaRWVSALrr5QJCq2vykRMDwIDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678200416; a=rsa-sha256; cv=none; b=xg51QMRncw1prY5mAflL2tL6LqOTj0HC0vfokt0V0KgISsA2xFX9saCYmf5b+yduAY/FP4 1ynUlukS2vIHU1w3FR6FQVJAggsNz1m+SPGaggwGqpSkQzKdspPwSInO+cyvVGQe9rwhul Sv0V370eK4cTge6Hj/JnTVLmrFqo8h31+InCwQyWgTfCRc/XXmm94Hv5Ny/sqZntC+fpxM 4e1RsAxV0VR0WrEP02wxK+plufjSOFiiBVlQdynmjoxNJiu/UzBEJQ7oeZIcLLPujliZf+ 6hj+9/qOKWasFjla1ZxSvJe0EFc7v6dOSFdx51MqQbfNvjunB7f7rW3iZ4ZKqg== 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 4PWJDw53XHznWd; Tue, 7 Mar 2023 14:46:56 +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 327EkuKg008808; Tue, 7 Mar 2023 14:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 327EkuNE008807; Tue, 7 Mar 2023 14:46:56 GMT (envelope-from git) Date: Tue, 7 Mar 2023 14:46:56 GMT Message-Id: <202303071446.327EkuNE008807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 56928500eceb - main - linux: Use the if_name() accessor to get loopback name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56928500eceb7ff381e2eaf4ea08f36a743d072e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=56928500eceb7ff381e2eaf4ea08f36a743d072e commit 56928500eceb7ff381e2eaf4ea08f36a743d072e Author: Justin Hibbits AuthorDate: 2023-03-06 16:36:31 +0000 Commit: Justin Hibbits CommitDate: 2023-03-07 14:47:01 +0000 linux: Use the if_name() accessor to get loopback name Avoid directly accessing the if_xname ifnet member. and use the designated accessor function instead. Sponsored by: Juniper Networks, Inc. --- sys/compat/linux/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index dcf5ac1e6892..47a6561264e9 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -329,7 +329,7 @@ ifname_bsd_to_linux_ifp(struct ifnet *ifp, char *lxname, size_t len) * Linux loopback interface name is lo (not lo0), * we translate lo to lo0, loX to loX. */ - if (IFP_IS_LOOP(ifp) && strncmp(ifp->if_xname, "lo0", IFNAMSIZ) == 0) + if (IFP_IS_LOOP(ifp) && strncmp(if_name(ifp), "lo0", IFNAMSIZ) == 0) return (strlcpy(lxname, "lo", len)); /* Short-circuit non ethernet interfaces. */