Re: pfctl: Do not optimize empty rulesets

2019-12-13 Thread Alexandr Nedvedicky
Hello, sorry it dropped on the floor of my INBOX... thanks for reminding. > 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? cha

Re: pfctl: Do not optimize empty rulesets

2019-12-12 Thread Mike Belopuhov
Klemens Nanni writes: > On Wed, Nov 27, 2019 at 08:04:47PM +0100, Klemens Nanni wrote: >> If an anchor/ruleset contains no rules, there is no point in creating >> a temporary copy, optimizing and replacing it. >> >> Regress passes on amd64. >> >> Feedback? OK? > Anyone? > FWIW, it looks good

Re: pfctl: Do not optimize empty rulesets

2019-12-12 Thread Klemens Nanni
On Wed, Nov 27, 2019 at 08:04:47PM +0100, Klemens Nanni wrote: > If an anchor/ruleset contains no rules, there is no point in creating > a temporary copy, optimizing and replacing it. > > Regress passes on amd64. > > Feedback? OK? Anyone? All optimizations work on actual rules; if there are non

pfctl: Do not optimize empty rulesets

2019-11-27 Thread Klemens Nanni
If an anchor/ruleset contains no rules, there is no point in creating a temporary copy, optimizing and replacing it. Regress passes on amd64. Feedback? OK? Index: pfctl_optimize.c === RCS file: /cvs/src/sbin/pfctl/pfctl_optimize.c,