Unix Technical Forum

Re: Problem with pf and user matching

This is a discussion on Re: Problem with pf and user matching within the lucky.openbsd.tech forums, part of the OpenBSD category; --> On Wed, Feb 16, 2005 at 11:02:09PM +0100, Manon Goo wrote: > >The kernel will evaluate the criteria in ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2008, 12:14 PM
Daniel Hartmeier
 
Posts: n/a
Default Re: Problem with pf and user matching

On Wed, Feb 16, 2005 at 11:02:09PM +0100, Manon Goo wrote:

> >The kernel will evaluate the criteria in a fixed order, in general the
> >cheap ones come first.

>
> Does this mean for a rule having expensive conditions (user = xx ) and
> cheap conditions (
> to = xx ) the rule stays cheap unless the cheap conditions are true ?


Yes, the evaluation does 'short-circuit'. If the evaluation of a cheap
criterion is false (meaning that the rule, as a whole, cannot possibly
match), the remaining criteria are not evaluated at all.

There's more optimizations like this. For instance, if the rule contains
a (cheap) source address restriction which is found to mismatch, and
subsequent rules (immediately following the current rule) also contain
the same source address restriction, those subsequent rules are skipped
entirely.

You can probably find a more detailed explanation when you google for
'pf skip steps'.

Daniel

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com