All of lore.kernel.org
 help / color / mirror / Atom feed
* Dealing with shared/cloned skbs?
@ 2005-08-23 15:07 Marcus Sundberg
  0 siblings, 0 replies; only message in thread
From: Marcus Sundberg @ 2005-08-23 15:07 UTC (permalink / raw)
  To: netfilter-devel, linux-net

Hi,

in the 2.4 net/ipv4/netfilter directory various ways are used to
check whether an skb needs to be copied before it is modified. At
least three ways are used:

if (skb_shared(skb) || skb_cloned(skb))

if (skb_cloned(skb) && !skb->sk)

if (skb_cloned(skb))

And at the places where the skb is actually copied some of them do:

	if ((oldskb)->sk)
		skb_set_owner_w(newskb, oldskb->sk);

while some of them do not.

What is the correct way to know if an skb needs to be copied before
modified, and what should be done after a copy takes place?

//Marcus
-- 
---------------------------------------+--------------------------
   Marcus Sundberg <marcus@ingate.com>  | Firewalls with SIP & NAT
  Software Developer, Ingate Systems AB |  http://www.ingate.com/

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

only message in thread, other threads:[~2005-08-23 15:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-23 15:07 Dealing with shared/cloned skbs? Marcus Sundberg

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.