Re: [External] : Re: make 'set skip on ...' dynamic

2021-12-25 Thread Alexandr Nedvedicky
Hello, > > updated diff is attached. > > One comment below but this diff is OK claudio@ > > > thanks and > > regards > > sashan > > > > 8<---8<---8<--8< > > void > > pfi_xcommit(void) > > { > > - struct pfi_kif *p; > > + struct pf

Re: [External] : Re: make 'set skip on ...' dynamic

2021-12-22 Thread Claudio Jeker
On Sat, Dec 04, 2021 at 07:01:23PM +0100, Alexandr Nedvedicky wrote: > Hello, > > > On Fri, Dec 03, 2021 at 03:42:09PM +0100, Claudio Jeker wrote: > > > > See comments below. > > > > > > > +void > > > +pfi_group_delmember(const char *group, struct ifnet *ifp) > > > +{ > > > + struct pfi_kif

Re: [External] : Re: make 'set skip on ...' dynamic

2021-12-04 Thread Alexandr Nedvedicky
Hello, On Fri, Dec 03, 2021 at 03:42:09PM +0100, Claudio Jeker wrote: > > See comments below. > > > > +void > > +pfi_group_delmember(const char *group, struct ifnet *ifp) > > +{ > > + struct pfi_kif *gkif, *ikif; > > + > > + if ((gkif = pfi_kif_get(group, NULL)) == NULL || > > +

Re: [External] : Re: make 'set skip on ...' dynamic

2021-12-03 Thread Claudio Jeker
On Fri, Nov 26, 2021 at 11:37:37PM +0100, Alexandr Nedvedicky wrote: > Hello, > > On Fri, Nov 26, 2021 at 01:01:40PM +0100, Claudio Jeker wrote: > > > > One more thing to consider, I think the following test in pfi_set_flags(): > > > > > + if ((p->pfik_flags_new != p->pfik_flags)

Re: [External] : Re: make 'set skip on ...' dynamic

2021-11-26 Thread Alexandr Nedvedicky
Hello, On Fri, Nov 26, 2021 at 01:01:40PM +0100, Claudio Jeker wrote: > > One more thing to consider, I think the following test in pfi_set_flags(): > > > + if ((p->pfik_flags_new != p->pfik_flags) && > > + (p->pfik_flagrefs == 0)) > > +

Re: [External] : Re: make 'set skip on ...' dynamic

2021-11-26 Thread Claudio Jeker
On Thu, Nov 25, 2021 at 02:56:02PM +0100, Alexandr Nedvedicky wrote: > Hello, > > thank you for taking a look at my diff. > > > > > > } > > > > > > - if (kif->pfik_ifp != NULL || kif->pfik_group != NULL || kif == pfi_all) > > > + if (kif->pfik_ifp != NULL || kif->pfik_group != NULL ||kif ==

Re: [External] : Re: make 'set skip on ...' dynamic

2021-11-25 Thread Alexandr Nedvedicky
Hello, thank you for taking a look at my diff. > > } > > > > - if (kif->pfik_ifp != NULL || kif->pfik_group != NULL || kif == pfi_all) > > + if (kif->pfik_ifp != NULL || kif->pfik_group != NULL ||kif == pfi_all) > > Missing space over^^^ he

Re: make 'set skip on ...' dynamic

2021-11-25 Thread Claudio Jeker
On Fri, Nov 19, 2021 at 12:59:38AM +0100, Alexandr Nedvedicky wrote: > Hello, > > it has turned out things are bit more complicated when it comes to interface > groups. diff below makes following scenario work for me. > > we start with etc/pf.conf as follows: > > # cat /etc/pf.conf >

Re: make 'set skip on ...' dynamic

2021-11-18 Thread Alexandr Nedvedicky
Hello, it has turned out things are bit more complicated when it comes to interface groups. diff below makes following scenario work for me. we start with etc/pf.conf as follows: # cat /etc/pf.conf set skip on lo set skip on test1 set skip on test2 set

Re: make 'set skip on ...' dynamic

2021-11-16 Thread Alexandr Nedvedicky
Hello, I've sent older version of diff. The new version contains a minor tweak to pfi_set_flags() to make it more defensive: + if (name[n-1] >= '0' && name[n-1] <= '9') { + p = pfi_kif_get(name, NULL); + if (p != NULL) { + p->pfik_flags_new

make 'set skip on ...' dynamic

2021-11-16 Thread Alexandr Nedvedicky
Hello, back in Gouveia claudio@ complained 'set skip on ...' requires reloading pf.conf, when new interface appears. Diff below should fix that. the idea is to introduce yet another reference type (PFI_KIF_REF_FLAG) pfi_kif objects. PFI_KIF_REF_FLAG type keeps pfi_kif object in pf's interface tab