linux/include/net/sctp
Simon Horman eee1d5a147 sctp: Correct type and usage of sctp_end_cksum()
Change the type of the crc32 parameter of sctp_end_cksum()
from __be32 to __u32 to reflect that fact that it is passed
to cpu_to_le32().

There are five in-tree users of sctp_end_cksum().
The following four had warnings flagged by sparse which are
no longer present with this change.

net/netfilter/ipvs/ip_vs_proto_sctp.c:sctp_nat_csum()
net/netfilter/ipvs/ip_vs_proto_sctp.c:sctp_csum_check()
net/sctp/input.c:sctp_rcv_checksum()
net/sctp/output.c:sctp_packet_transmit()

The fifth user is net/netfilter/nf_nat_proto_sctp.c:sctp_manip_pkt().
It has been updated to pass a __u32 instead of a __be32,
the value in question was already calculated in cpu byte-order.

net/netfilter/nf_nat_proto_sctp.c:sctp_manip_pkt() has also
been updated to assign the return value of sctp_end_cksum()
directly to a variable of type __le32, matching the
type of the return value. Previously the return value
was assigned to a variable of type __be32 and then that variable
was finally assigned to another variable of type __le32.

Problems flagged by sparse.
Compile and sparse tested only.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-04-29 20:09:08 +02:00
..
auth.h [SCTP]: Stop claiming that this is a "reference implementation" 2008-02-05 10:59:07 -05:00
checksum.h sctp: Correct type and usage of sctp_end_cksum() 2013-04-29 20:09:08 +02:00
command.h sctp: Clean up type-punning in sctp_cmd_t union 2012-11-03 14:54:55 -04:00
constants.h net: sctp: introduce uapi header for sctp 2013-04-09 13:19:39 -04:00
sctp.h hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
sm.h sctp: send abort chunk when max_retrans exceeded 2012-11-20 15:50:37 -05:00
structs.h net: sctp: minor: remove dead code from sctp_packet 2013-04-22 16:25:21 -04:00
tsnmap.h sctp: be more restrictive in transport selection on bundled sacks 2012-06-30 22:44:35 -07:00
ulpevent.h sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket 2011-07-08 09:53:08 -07:00
ulpqueue.h net: sctp: sctp_ulpq: remove 'malloced' struct member 2013-04-17 14:13:02 -04:00