From nobody Thu Mar 10 00:33:40 2022 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 3D11119F3425; Thu, 10 Mar 2022 00:33:41 +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 4KDVRT0n04z4kwK; Thu, 10 Mar 2022 00:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646872421; 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=afMzo2TS7FFqjVlD3oacT82LBakgZ1jxZeObhsLjG4w=; b=PJPcKd/fjECGbZZJVvDlJ536+yIhA0UZQIDGfXOUWQfTAzfYp4YcAC9rBzO4fybS4a/2Y1 rjK5HnXwaYkmQWZO8D9CSLr4p9kuvK2a5gZciZZWST6Bpzgaq0RBSL83D4La+kFzHv0eG6 e/967t8txZc+qYz9ROoY6PGyggWDAR+GL4gD75zCLsXJbaVqioO/kYfchNZotk+XrnE0UL N4qxkI2NldZNi0B6y18UAB72c3IdmNXHIyQLFrreXDHGuO+F5fFG65kzqHwPvIfypMpbNS zq05YTUXW8aeVlI7N9FVyLiEsbagwvZ3gxcMYegwzuyaHAKmnLhLr0YAcLIScA== 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 EF68D1B0B0; Thu, 10 Mar 2022 00:33:40 +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 22A0XeLx059764; Thu, 10 Mar 2022 00:33:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22A0XexG059763; Thu, 10 Mar 2022 00:33:40 GMT (envelope-from git) Date: Thu, 10 Mar 2022 00:33:40 GMT Message-Id: <202203100033.22A0XexG059763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 6b46a577c33e - stable/12 - ipfilter: Obtain the interface name more efficiently 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6b46a577c33e8e158e3115e06a58654d79e93ffe Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646872421; 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=afMzo2TS7FFqjVlD3oacT82LBakgZ1jxZeObhsLjG4w=; b=cLw5mvNToHN92PuxcP2AS7pr28QEhkGM5mrHZS4tGPoS8ElHDX8nDYq6VCJr3rvZue/BvD MuIWHl3Byk+BxDBp1w+1AbpNTXBeVDWTAMIhWOcr3YU3ZTrOlpkReyio6rYNU/W2TVORlM pIzrDd2xhsEz0OoFtojsXDQMBDbZ87HhW26jzCZDo4Vmr79Et+H4Wjmq7YQIX46M+9EBMj m3zOM3gG0XNWD8YWQYwExlCqrCfir7HGSo4KjvADmQu/HS7eZY0gJ2leHAsvUFlxep/T+R UNn02QgojpyQSU/mmnfqYS7wstN6e+J9U9+YWNCfd+9vESRVTFI1YzfSQKk8gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646872421; a=rsa-sha256; cv=none; b=BxSJb0b3CA5ydxrgm+AMTbM8exz/ZzS5P7S0iv5V7PLCTeV8ki+t9AJSmukpYoCdhyqN1s vGjq4xHkz6S8WoG+4I9ff3SoKCUNfhLV+l+8ot42V/eceSKTg52HqOUE7Esp4K9gXdHz6J Cpilcnzq1UPjBTH6UZN7mzh+gmFXBKdpjUnFZUrVchjl1Kx1M4ibxvcVrVO35Xr1qGuGyR YGEnieovkKKeHXk5GB8XeYaEuXSrQkLDJjRhhHbrUzl2EdWifPPmUAS9CezMxC17mxTLwi fR95wDBr5V0MedMm1vRHWHUlOIv+hCFd9hcONvQx4RikdShBaFNVxRPzqW+6uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6b46a577c33e8e158e3115e06a58654d79e93ffe commit 6b46a577c33e8e158e3115e06a58654d79e93ffe Author: Cy Schubert AuthorDate: 2022-03-03 06:40:18 +0000 Commit: Cy Schubert CommitDate: 2022-03-10 00:33:20 +0000 ipfilter: Obtain the interface name more efficiently Rather than use a kmem read to determine the interface name used by a nat_t structure through a pointer, nat_ipfs->netif->if_xname, obtain it directly from nat_ifnames in the nat_t structure itself using the new FORMAT_IF macro. (cherry picked from commit ec793543feff027f0de9dff3708ab86f5e567d15) --- sbin/ipf/libipf/printactivenat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/printactivenat.c b/sbin/ipf/libipf/printactivenat.c index 3a6337ab0f7b..222f85a5818b 100644 --- a/sbin/ipf/libipf/printactivenat.c +++ b/sbin/ipf/libipf/printactivenat.c @@ -124,8 +124,8 @@ printactivenat(nat_t *nat, int opts, u_long ticks) getsumd(nat->nat_sumd[1]), nat->nat_pr[0], nat->nat_pr[1], nat->nat_hv[0], nat->nat_hv[1], nat->nat_flags); - PRINTF("\tifp %s", getifname(nat->nat_ifps[0])); - PRINTF(",%s ", getifname(nat->nat_ifps[1])); + PRINTF("\tifp %s,%s ", FORMAT_IF(nat->nat_ifnames[0]), + FORMAT_IF(nat->nat_ifnames[1])); #ifdef USE_QUAD_T PRINTF("bytes %"PRIu64"/%"PRIu64" pkts %"PRIu64"/%"PRIu64"", (unsigned long long)nat->nat_bytes[0],