I guess what you want is simply this

Index: pfctl.c
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl.c,v
retrieving revision 1.244
diff -u -r1.244 pfctl.c
--- pfctl.c     17 Nov 2005 20:52:39 -0000      1.244
+++ pfctl.c     21 Apr 2006 20:00:46 -0000
@@ -1929,7 +1929,8 @@
                                err(1, "%s", rulesopt);
                }
        }
-       if ((rulesopt != NULL) && (!*anchorname))
+       if ((rulesopt != NULL) && (loadopt & PFCTL_FLAG_OPTION) &&
+           !anchorname[0])
                if (pfctl_clear_interface_flags(dev, opts | PF_OPT_QUIET))
                        error = 1;
 
i.e. only reset the interface flags if we're subsequently loading
options. If we're not loading any options, there's no reason to reset
them beforehand.

Note that plain -f will set that flag, as will -O and any combination of
-O with -N/-R.

For me, this makes sense. This allows stuff like

  pfctl -sn | sed some-replacement | pfctl -Nf -

without affecting options.

Daniel

Reply via email to