git: b820820ece09 - main - mac_ipacl: Use IfAPI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Aug 2023 16:52:53 UTC
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=b820820ece099a73511d7daec407d78f38185a9b commit b820820ece099a73511d7daec407d78f38185a9b Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2023-08-25 16:44:17 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> 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;