From nobody Thu Mar 03 15:27:19 2022 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 9E75819F59E9; Thu, 3 Mar 2022 15:27: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 4K8Zbr0XPTz3nfd; Thu, 3 Mar 2022 15:27:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646321240; 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=8llPR7kMuV6ckTXOFFBF5j4KGvgJvaU7G5ba3RHzAvU=; b=oehPmrW7cPj3N3PyAuxbiRP4I9yY38i2jpUvR3v1RJY0uGJZ7kO2GLywcRqVFDPTLxG3QV CgPXuzHt7gtMcIx02Jen6SXl5gULSPcEIUw4gvX1Ms7d+SDtME8UpMMScEqaUZKZfeKRdV SyLpUKYC7VVLX/taxfSClXQTNgyuoJzKqE1v4rTVgP2QoZ6w/xHAwO5oztsGmg0JZy9rRu KLJGNyZVuoJFUzdDVypZMjeho4ogbzvWaGTfWHhZlUUBp1vCYYPMqJBB+yhe2en62jmuuR ANkt5ghCddf/MYJtn19Dntp41dCluug42gc2uF0P2dQSziw0WB4Q65hwC3obMg== 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 D9F9B1A3B6; Thu, 3 Mar 2022 15:27:19 +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 223FRJmr077906; Thu, 3 Mar 2022 15:27:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 223FRJx7077905; Thu, 3 Mar 2022 15:27:19 GMT (envelope-from git) Date: Thu, 3 Mar 2022 15:27:19 GMT Message-Id: <202203031527.223FRJx7077905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: ec793543feff - main - ipfilter: Obtain the interface name more efficiently 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec793543feff027f0de9dff3708ab86f5e567d15 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646321240; 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=8llPR7kMuV6ckTXOFFBF5j4KGvgJvaU7G5ba3RHzAvU=; b=NpmugulHXoiebyyYb8NMDOfQwU+XtMdmm8zl1WxUd0IgMWJrD280n3iykcnw1kUZmMXnHt e+Bhps/AJoKT0hsJcOfFIJ4IzXhCFC4m9X78IgbtyMRjIAmPmgiitgNLL4kUQWxXToHVp5 IctT+0PwSzUYe/t8ziQbAMyPaxyACeA2ti0YolSeF7L4cFmdJ/2nH2ob4hrHN/RPp2oWKo deXnq3zR7ABWvg6zBZiKLLBRqbS9qsPhDzor1A7oXfAgzPV2YfQwNE2x2mXnO6AGxbfAEL O4J9CJLwgT53oyM1K7mMBPpJ1riU5GVXjJ2PhsMUAoQjPwAvs6gnGBqMCEOnUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646321240; a=rsa-sha256; cv=none; b=oT3OoAce2muK00kKNhyocLmZJF48Gsa+XCw6xBMClwGbcWokwXE4WIPxqf/t2A8FvGZct1 Tf8Dc7Ils5B43jHPZQAtfL5oWskGiWGMJbwlZ8uhV/nsvlsuvKoW+ljc1atJ8VutygM24/ 3X/cExv1Wm3uS+NyrZJrpoM5AtqJsUHCZsVZ+FxTGxJYbQu/3Il9woZvfI4zJ5u7ERh354 xJJ0oluIftP+Z/K6ibDPvt5q7ubu/S/RJCBeAfjTTBlsRNpPVzo82SlSgOXgAprx4e7m2+ DA0WD/BqkZmyG0Bnj/iKVWR0i6+Vex7ufj244T+jDSYf6PuMum86zTBV0+cBww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ec793543feff027f0de9dff3708ab86f5e567d15 commit ec793543feff027f0de9dff3708ab86f5e567d15 Author: Cy Schubert AuthorDate: 2022-03-03 06:40:18 +0000 Commit: Cy Schubert CommitDate: 2022-03-03 14:43:11 +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. MFC after: 1 week --- 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],