[patch] Source entries removing is awfully slow.
Kajetan Staszkiewicz
vegeta at tuxpowered.net
Mon Dec 2 17:24:51 UTC 2013
Dnia poniedziałek, 2 grudnia 2013 o 16:36:38 Gleb Smirnoff napisał(a):
> Kajetan,
>
> On Sun, Dec 01, 2013 at 08:05:54PM +0100, Kajetan Staszkiewicz wrote:
> K> > Ok. Let's summurize what we need to:
> K> >
> K> > 1) Switch kill|reset, that affects both -K and -k.
> K> > 2) Add option to -K that would kill states.
> K> > 3) Add option to -K and -k to specify that argument is a table.
> K> > 4) Try not to add new global option keys.
> K> >
> K> > What we got:
> K> >
> K> > 1) -k supports specifying that argument is label or id. This is done
> via K> > multiple -k specifiers:
> K> >
> K> > pfctl -k id -k 4823e84500000003
> K> >
> K> > 2) -K and -k can be specified twice, meaning -k source -K destination.
> K> >
> K> > So, 1) and 2) make order of multiple arguments important.
> K> >
> K> > The main problem is that we need to keep working current syntax, which
> I K> > find ugly. The biggest problem is that order of arguments matters.
> This is K> > really a bad habbit.
> K> >
> K> > What about if we come with something order-agnostic as alternative to
> K> > current syntax? And put all enhanced state/srcnode killing/resetting
> into K> > this new syntax, w/o touching current syntax. The current syntax
> will be K> > mark as obsoleted in manual page. We might even want to
> implement all K> > these new features in a new utility. Not sure there is
> a reason to do, so K> > but is possible.
> K>
> K> I believe it is possible to extend the current syntax without breaking
> K> compatibility. Have a look:
> K> - A list of -K string1 -K string2... is provided.
> K> - Magic keywords are: label, id, table, rdrhost, kill ("states",
> K> "rststates").
> K> - If there is a magic keyword at any position, the next position is a
> value for K> the keyword.
> K> - If there is a string, which is not a magic keyword, at any position,
> it is K> src host or dst host, depending on position (first is src, next
> is dst). K> - Of course not all keywords apply both to -K and -k (e.g
> state's rdrhost is K> src_node's dst).
> K>
> K> This is:
> K> - Compatible with the current syntax.
> K> - Extends the syntax to my needs.
> K> - By coincidence extedns the syntax for matching by multiple keywords +
> src/dst K> at once. Kernel should already handle that, pfctl.c needs to
> be changed. K>
> K> It can be extended with more magic keywords: srchost, dsthost. This
> would make K> order of tuples (-K keyword -K value) fully obsolete.
> K>
> K> How do you find the idea?
>
> Well, that would work. I just dislike the current syntax order dependant:
>
> '-K foo -K bar' isn't equal to '-K bar -K foo'
>
> But compatibility issue can overweight saneness.
Do we have an agreement then? Shall I start developing this?
> Hmm, may be it is worth make our discussion public? The freebsd-pf@
> or freebsd-net@ would be okay.
I think it's a bit late, but I somehow forgot about this in the first email.
Added pf@ now.
--
| pozdrawiam / greetings | powered by Debian, FreeBSD and CentOS |
| Kajetan Staszkiewicz | jabber,email: vegeta()tuxpowered net |
| Vegeta | www: http://vegeta.tuxpowered.net |
`------------------------^---------------------------------------'
More information about the freebsd-pf
mailing list