* How to avoid fragmentation
@ 2005-10-24 20:15 Gervasio Bernal
2005-10-24 23:37 ` Pablo Neira
0 siblings, 1 reply; 3+ messages in thread
From: Gervasio Bernal @ 2005-10-24 20:15 UTC (permalink / raw)
To: netfilter-devel
Hi all!!
I'm developing a new target extension and I need to add some extra data
and headers in TCP/UDP packets. But I'm having a problem: fragmentation.
In the header developed by me I add a new checksum field to verify the
integrity of that header. This works fine while there is no
fragmentation. If the packet is fragmented I can't recalculate that
checksum.
Does someone know how to correct or avoid this? Or have experience with
fragmentation?
Thanks a lot!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to avoid fragmentation
2005-10-24 20:15 How to avoid fragmentation Gervasio Bernal
@ 2005-10-24 23:37 ` Pablo Neira
[not found] ` <435D6030.8000509@speedy.com.ar>
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira @ 2005-10-24 23:37 UTC (permalink / raw)
To: Gervasio Bernal; +Cc: netfilter-devel
Gervasio Bernal wrote:
> I'm developing a new target extension and I need to add some extra data
> and headers in TCP/UDP packets. But I'm having a problem: fragmentation.
> In the header developed by me I add a new checksum field to verify the
> integrity of that header. This works fine while there is no
> fragmentation. If the packet is fragmented I can't recalculate that
> checksum.
>
> Does someone know how to correct or avoid this? Or have experience with
> fragmentation?
Hm, still missing some information. You mean that you can't recalculate
the checksum because the checksum part is missing, don't you? Use
skb_header_pointer(...) to work with the headers, it's fragment-aware.
--
Pablo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to avoid fragmentation
[not found] ` <435D6030.8000509@speedy.com.ar>
@ 2005-10-27 12:41 ` Pablo Neira
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira @ 2005-10-27 12:41 UTC (permalink / raw)
To: Gervasio Bernal; +Cc: Netfilter Development Mailinglist
Hi,
Gervasio Bernal wrote:
> I will show you an example:
>
> +---------------+
> | IP |
> | header |
> |---------------|
> | TCP |
> | header |
> |---------------|
> | My header |
> |---------------|
> | |
> | USER DATA |
> | |
> +---------------+
>
> I calculte the USER DATA checksum and put it in a field of My header.
> If the packet is larger than MTU, it will be fragmented and the checksum
> calculated in My header will be incorrect when I recieve it in the other
> endpoint of the communication.
>
> There is some form to avoid the fragmentation?
In this case, have a look at skb_checksum()
--
Pablo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-27 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-24 20:15 How to avoid fragmentation Gervasio Bernal
2005-10-24 23:37 ` Pablo Neira
[not found] ` <435D6030.8000509@speedy.com.ar>
2005-10-27 12:41 ` Pablo Neira
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.