Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 2021 12:02:21 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: fc58438ca26b - stable/12 - pfctl: Revert "pfctl: Another set skip <group> fix"
Message-ID:  <202105041202.144C2L6q093205@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=fc58438ca26b46f65439bcfc89052de1008b9774

commit fc58438ca26b46f65439bcfc89052de1008b9774
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-04-26 08:07:07 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-05-04 07:52:00 +0000

    pfctl: Revert "pfctl: Another set skip <group> fix"
    
    This reverts commit 0c156a3c32cd0d9168570da5686ddc96abcbbc5a.
    This fix broke using '<ifgroup>:network' in tables.
    
    MFC after:      1 week
    
    (cherry picked from commit d5b08e13dd6beb3436e181ff1f3e034cc8186584)
---
 sbin/pfctl/pfctl_parser.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 2efb97285798..7416ae26be48 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1392,26 +1392,6 @@ ifa_exists(char *ifa_name)
 	return (NULL);
 }
 
-static struct node_host *
-if_lookup(char *if_name)
-{
-	struct node_host *p, *n;
-
-	for (p = iftab; p; p = p->next) {
-		if (! strcmp(if_name, p->ifname)) {
-			n = calloc(1, sizeof(struct node_host));
-			bcopy(p, n, sizeof(struct node_host));
-
-			n->next = NULL;
-			n->tail = n;
-
-			return (n);
-		}
-	}
-
-	return (NULL);
-}
-
 struct node_host *
 ifa_grouplookup(char *ifa_name, int flags)
 {
@@ -1435,7 +1415,7 @@ ifa_grouplookup(char *ifa_name, int flags)
 	for (ifg = ifgr.ifgr_groups; ifg && len >= sizeof(struct ifg_req);
 	    ifg++) {
 		len -= sizeof(struct ifg_req);
-		if ((n = if_lookup(ifg->ifgrq_member)) == NULL)
+		if ((n = ifa_lookup(ifg->ifgrq_member, flags)) == NULL)
 			continue;
 		if (h == NULL)
 			h = n;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105041202.144C2L6q093205>