RE: [RFC PATCH net-next 2/5] net: split skb_checksum_help

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

 



From: Tom Herbert
> Sent: 23 January 2017 21:00
..
> skb_checksum_help is specific to the Internet checksum. For instance,
> CHECKSUM_COMPLETE can _only_ refer to Internet checksum calculation
> nothing else will work. Checksums and CRCs are very different things
> with very different processing. They are not interchangeable, have
> very different properties, and hence it is a mistake to try to shoe
> horn things so that they use a common infrastructure.
> 
> It might make sense to create some CRC helper functions, but last time
> I checked there are so few users of CRC in skbufs I'm not even sure
> that would make sense.

I can imagine horrid things happening if someone tries to encapsulate
SCTP/IP in UDP (or worse UDP/IP in SCTP).

For UDP in UDP I suspect that CHECKSUM_COMPLETE on an inner UDP packet
allows the outer checksum be calculated by ignoring the inner packet
(since it sums to zero).
This just isn't true if SCTP is involved.
There are tricks to generate a crc of a longer packet, but they'd only
work for SCTP in SCTP.

For non-encapsulated packets it is a different matter.

	David

��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux