From 32574d65aa8048354c98f0558f0d79feb991cb0e Mon Sep 17 00:00:00 2001 From: kp Date: Tue, 10 Jul 2018 07:29:51 +0000 Subject: [PATCH] MFC r335886: 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 --- 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 9cc4725a12c..2241f6fb199 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2407,7 +2407,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; -- 2.45.0