netfilter -> modify packet -> recompute checksum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I made a module that modify a packet using netfilter hooks.
But, I don't know how to recompute the checksum.
Can you give me some ideas?

I tried with:
skb -> csum = skb_checksum (skb, 0, skb -> len, 0) but seems that doesn't
work (seems hat is not enough).

Do I need to compute ip header checksum and tcp header checksum
separately?

Thank you very much!

---
Catalin(ux) BOIE
catab@deuroconsult.ro


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux