All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] tc filter u32 nexthdr, chained filters?
@ 2001-12-08 23:39 Henrik Nordstrom
  0 siblings, 0 replies; only message in thread
From: Henrik Nordstrom @ 2001-12-08 23:39 UTC (permalink / raw)
  To: lartc

Hi.

Is there anyone who has understood of how u32 nexthdr addressing is supposed 
to work? (including the "tcp/icmp/.." matches who implicitly uses nexthdr)

From reading the kernel code it apparently is using the location set by 
"offset at", but this seems to only be evaluated on hash parents, and only 
for it's children..

I.e. the logic for u32 filter rule processing seems to be something like

  if all matches true
    if terminal filter rule
      execute action
    else if link rule
      if offset plus/at
        calculate nexthdr offset
      if offset eat
        skip any data up to the nexthdr pointer
      follow filter link
    endif
  endif


Think it would be more logical if the nexthdr offset was calculated before 
the matches. This way one could create a simple filter rule for matching TCP 
data. But I am sure there is some reason to why it is the way it is?

Also, the filter processing seems to be capable of linking filter rules 
without using a hash table, but I cannot figure out how to create such a tc 
filter rule.

Obviously I am a bit confused.. I have not yet fully got the grips on how to 
set up hashed or linked filters. The HOWTO is a bit confusing in this chapter 
I think. Would be nice with a explanation why that many filter rules are 
created (or if they are not actually many filters, why that many commands are 
required). Intuitively it should be sufficient with one tc filter command to 
create the hash table rule, and then the tc filter commands to create the 
hash chains as required... And the fact that some qdisc has built in filters 
does not make the filter concepts easier to understand either (prio)..

Regards
Henrik Nordström

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-08 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-08 23:39 [LARTC] tc filter u32 nexthdr, chained filters? Henrik Nordstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.