All of lore.kernel.org
 help / color / mirror / Atom feed
* Modify an sk_buff from an NF_HOOK
@ 2005-03-02  1:50 Ian Norton
  2005-03-02  1:58 ` Tobias DiPasquale
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Norton @ 2005-03-02  1:50 UTC (permalink / raw)
  To: netfilter-devel

Hi everyone,

I've been faffing about for well over two weeks now, and, have come almost to
the conculsion (as I hauntingly suspected) that 'any' changes to an skb that
involve changes outside of the original values of skb->head and skb->tail are 
impossible to do safely. 

say you want to add some bytes to the end of your packet payload, you might
do skb_put(skb,bytes_to_add). you will get a pointer to the old skb->tail
and the new value of skb->tail will be increased accordingly.

this is all well and good, it seems to work, you can see your packet data
without it going crazy, but, then you return your newly changed packet to
netfilter.

and...

you loose everything after the old skb->tail pointer.

I expect this is really going past what netfilter is supposed to do, (after
all, what kind of filter adds stuff?)


-- 
Ian Norton-Badrul

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

end of thread, other threads:[~2005-03-02  4:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-02  1:50 Modify an sk_buff from an NF_HOOK Ian Norton
2005-03-02  1:58 ` Tobias DiPasquale
2005-03-02  4:30   ` Ian Norton

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.