From nobody Fri Aug 25 16:52:53 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 4RXQxL1JbVz4qX4M; Fri, 25 Aug 2023 16:52:54 +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 4RXQxL064Kz4tjk; Fri, 25 Aug 2023 16:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692982374; 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=SNBUz7RYDGREEfN21vFM/GIMfADHlBi8Ay2fWSBhvNc=; b=slVQJBkNojgzxUbQ1hxBJ0rCYaPP73ewF1ptdAZcaHmm21QmY5BrADk9UExsbcviBgxU0Z hLj7X3TyQugfF/4ekbfA2HnsY7NJjXvm0LSp7+SwTQaVA/PhXbQ8p6otso6xyBykg9lNDn UMW7/xurTWY0Fl9woRSZwhc5o1zgv7JHQf6Ja37iv0F4IGwOfmAmb1G6jtX+MNGv4tiRHR wuKAjf4gE36J6qYXvSa534l5MTzFKcsQ0ascbpdYz52RpQYUQiw4EJVuMnvD9nY3Y1JgyI 6z2aYHcR0S0U2N1T91yxqdCjNHHaOIZMOGwEjDDhQ5NupYABB3K/9++pqveH/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692982374; 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=SNBUz7RYDGREEfN21vFM/GIMfADHlBi8Ay2fWSBhvNc=; b=kEqkb/z6O4bIv0svFi8JZSjkkF0SogbM6rnAfFKehUdqB0k/3EJ+8DwZJjMYSMmelpSQDW 0ktxM/DWhkVcjH1oiVM0S0gDwdbZWEdIrwGcfNP+7h12LqxcPjUPzY+bd5WoSWJGA1gNru 4/6g/kPoJdr033RqqgTE08fQi0tE/xlKiEHv8dhmFQwWqbMM2k/RAysQKfhnGUN5wdTQd+ yi4q3+RXupkTgMjyAfLkYa8PsoPkAnUyj9GXveqzoOaeW/baY/WLhS7iG+4ztEZV8OHHhL vh4+kiLS/+MwOd12Cj7NYpN/Z6e6VS1TMDD7wEk7Ygn3M+wcmgUYMZpISR1Dgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692982374; a=rsa-sha256; cv=none; b=oGS1EEZ4o/W/cplV8GfiCR3MdP8n/q9SbFsitw2NqfDxG1M9wvpQregeLAGZFiyhBDT6Yp yGoWA6vfVrDwNud/bJPJSjmtLjiNRYPHhrjoIVN1IWjjMbFd+yZzIuop+G0hpQTosnKicg Qzz3A39z61dMPAMXxOsBm1NlXOUDkbxhQqn5DrjtDTzqNJgmQ3KyhRkES1s/yPav2C2Zwp pWJNhYXNUdaqVVm41ZXGTSX2VsUUGtA7rX/CLbFdZzetzq15RBATvzfCU5vWFgJCRo6TwI xDxcjvNpqJFj/ZWAjcuT27HgBlwYqf9+KZ5SwdU7/D5PogDtCGS8G0qzYQac1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RXQxK6KFmz1FxX; Fri, 25 Aug 2023 16:52:53 +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 37PGqr95032854; Fri, 25 Aug 2023 16:52:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37PGqrOO032851; Fri, 25 Aug 2023 16:52:53 GMT (envelope-from git) Date: Fri, 25 Aug 2023 16:52:53 GMT Message-Id: <202308251652.37PGqrOO032851@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: b820820ece09 - main - mac_ipacl: Use IfAPI 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: b820820ece099a73511d7daec407d78f38185a9b Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=b820820ece099a73511d7daec407d78f38185a9b commit b820820ece099a73511d7daec407d78f38185a9b Author: Justin Hibbits AuthorDate: 2023-08-25 16:44:17 +0000 Commit: Justin Hibbits CommitDate: 2023-08-25 16:50:39 +0000 mac_ipacl: Use IfAPI Use `if_t` instead of `struct ifnet *`, and if_name() accessor. Sponsored by: Juniper Networks, Inc. --- sys/security/mac_ipacl/mac_ipacl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/security/mac_ipacl/mac_ipacl.c b/sys/security/mac_ipacl/mac_ipacl.c index 5bcb9d652a13..bed77e7866f2 100644 --- a/sys/security/mac_ipacl/mac_ipacl.c +++ b/sys/security/mac_ipacl/mac_ipacl.c @@ -317,7 +317,7 @@ SYSCTL_PROC(_security_mac_ipacl, OID_AUTO, rules, static int rules_check(struct ucred *cred, - struct ipacl_addr *ip_addr, struct ifnet *ifp) + struct ipacl_addr *ip_addr, if_t ifp) { struct ip_rule *rule; int error; @@ -344,7 +344,7 @@ rules_check(struct ucred *cred, continue; if (strcmp(rule->if_name, "\0") && - strcmp(rule->if_name, ifp->if_xname)) + strcmp(rule->if_name, if_name(ifp))) continue; switch (rule->af) { @@ -397,7 +397,7 @@ rules_check(struct ucred *cred, #ifdef INET static int ipacl_ip4_check_jail(struct ucred *cred, - const struct in_addr *ia, struct ifnet *ifp) + const struct in_addr *ia, if_t ifp) { struct ipacl_addr ip4_addr; @@ -417,7 +417,7 @@ ipacl_ip4_check_jail(struct ucred *cred, #ifdef INET6 static int ipacl_ip6_check_jail(struct ucred *cred, - const struct in6_addr *ia6, struct ifnet *ifp) + const struct in6_addr *ia6, if_t ifp) { struct ipacl_addr ip6_addr;