From 7a2bf4c52ec41f53ca949893ebeb9c7a01bd8f5d Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Tue, 3 Jul 2018 08:50:49 +0000 Subject: [PATCH] pfctl: Don't retrieve interface list if '-n' is set If '-n' is set we don't use the list of skip interfaces, so don't retrieve it. This fixes issues if 'pfctl -n' is used before the pf module is loaded. This was broken by r333181. Reported by: Jakub Chromy MFC after: 1 week --- sbin/pfctl/pfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 6388db90d97..7e5da60ed20 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2409,7 +2409,7 @@ main(int argc, char *argv[]) } if ((rulesopt != NULL) && (loadopt & PFCTL_FLAG_OPTION) && - !anchorname[0]) + !anchorname[0] && !(opts & PF_OPT_NOACTION)) if (pfctl_get_skip_ifaces()) error = 1;