Hello Giannis,

On Thu, Jul 06, 2023 at 01:54:36PM +0300, Kapetanakis Giannis wrote:
</snip>
> 
> Hi sashan,
> 
> Your logic seems fine to me. Indeed it acts like they are persistent. They 
> don't have the p flag.
> 
> # pfctl -a 'relayd/dir-imap' -sT -vg
> --a-r-- dir-imap?????????????? relayd/dir-imap
> # pfctl -a 'relayd/dir-sieve' -sT -vg
> --a-r-- dir-sieve???????????? relayd/dir-sieve
> # pfctl -a 'relayd/dir-lmtp' -sT -vg
> --a-r-- dir-lmtp?????????????? relayd/dir-lmtp
> 
> note that in pfe_filter.c in init_tables() is see
> 
> 73: tables[i].pfrt_flags |= PFR_TFLAG_PERSIST;
> 
> Giannis
> ps. I've send a diff about statistics in tech@
> It does more than just checking table->up status, but your approach is much 
> better.
> 

    thanks for checking. so this needs fix. the persistent
    flag (PFR_TFLAG_PERSIST) gets lost if ioctl() loads rules
    before table. pfctl(8) also sets PFR_TFLAG_PERSIST on all tables
    it creates/loads. But the flag gets lost if table is created
    by rule beforehand. See my earlier email.

    this will need some more though. I'm not sure if it is a bug
    in pf(4) itself or feature of pf(4). If it is pf(4) feature,
    then fix needs to go to relayd.


thank you for all your help here.
regards
sashan

Reply via email to