All of lore.kernel.org
 help / color / mirror / Atom feed
* target_info read only?
@ 2003-01-20 23:37 Thomas Heinz
  2003-01-21  9:58 ` Harald Welte
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Heinz @ 2003-01-20 23:37 UTC (permalink / raw)
  To: netfilter-devel

Hi

A netfilter target (struct ipt_entry_target) can contain an
arbitrary amount of private data which is delivered to the
target function in case the corresponding rule matches.

Now it would be possible for the target function to modify
the private data although I haven't seen any target that
does this. In contrast to targets this behaviour is quite
normal for matches, especially stateful ones.

Now, I have two questions:

1) Is there any target (kernel and cvs) that already modifies
    its private data (maybe I have overlooked one)?

2) If ! 1) is there any reason for which targets might want
    to write to their private data buffer and if not can
    I assume that netfilter targets must (sort of unwritten law
    like) treat their private data as read only?

Thanks for your answer.


Regards,

Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: target_info read only?
  2003-01-20 23:37 target_info read only? Thomas Heinz
@ 2003-01-21  9:58 ` Harald Welte
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Welte @ 2003-01-21  9:58 UTC (permalink / raw)
  To: Thomas Heinz; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

On Tue, Jan 21, 2003 at 12:37:35AM +0100, Thomas Heinz wrote:
> Hi
> 
> A netfilter target (struct ipt_entry_target) can contain an
> arbitrary amount of private data which is delivered to the
> target function in case the corresponding rule matches.

true.

> Now it would be possible for the target function to modify
> the private data although I haven't seen any target that
> does this. In contrast to targets this behaviour is quite
> normal for matches, especially stateful ones.

true.

> 1) Is there any target (kernel and cvs) that already modifies
>    its private data (maybe I have overlooked one)?

Not that I am aware of....  You might want to look for the PSD target (yes,
it was a target before it became a match).  This was years ago.

> 2) If ! 1) is there any reason for which targets might want
>    to write to their private data buffer and if not can
>    I assume that netfilter targets must (sort of unwritten law
>    like) treat their private data as read only?

no. they can.  But please note that (like matchinfo) you are operating
on per-cpu local data.  So in an SMP system, there will be one targinfo
per cpu.

> Regards,
> Thomas

-- 
- Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-21  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 23:37 target_info read only? Thomas Heinz
2003-01-21  9:58 ` Harald Welte

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.