Hello,

sorry it dropped on the floor of my INBOX...
thanks for reminding.

</snip>
> Yes, the main anchor prints as "" but all that is behind compile time
> -DOPT_DEBUG so regular users won't deal with it anyway, so keep the code
> simple instead of adding logging around `rs->anchor->path'.
> 
> OK?

change looks good. OK sashan@

> 
> 
> Index: pfctl_optimize.c
> ===================================================================
> RCS file: /cvs/src/sbin/pfctl/pfctl_optimize.c,v
> retrieving revision 1.42
> diff -u -p -r1.42 pfctl_optimize.c
> --- pfctl_optimize.c  28 Jun 2019 13:32:45 -0000      1.42
> +++ pfctl_optimize.c  12 Dec 2019 20:06:15 -0000
> @@ -270,7 +270,10 @@ pfctl_optimize_ruleset(struct pfctl *pf,
>       struct pf_rule *r;
>       struct pf_rulequeue *old_rules;
>  
> -     DEBUG("optimizing ruleset");
> +     if (TAILQ_EMPTY(rs->rules.active.ptr))
> +             return (0);
> +
> +     DEBUG("optimizing ruleset \"%s\"", rs->anchor->path);
>       memset(&table_buffer, 0, sizeof(table_buffer));
>       skip_init();
>       TAILQ_INIT(&opt_queue);
> 

Reply via email to