History

sctp: fix some type cast warnings introduced by stream reconf

These warnings were found by running 'make C=2 M=net/sctp/'. They are introduced by not aware of Endian when coding stream reconf patches. Since commit c0d8bab6ae51 ("sctp: add get and set sockopt for reconf_enable") enabled stream reconf feature for users, the Fixes tag below would use it.

Xin Long committed 9 years ago

Commit 1da4fc91 parent 50317fc6 files · +39 −30Browse files

Showing the changes to include/linux (1 of 6 files). Show all

Unified · Split

include/linux/sctp.h+16−16
@@ -716,28 +716,28 @@ struct sctp_reconf_chunk { · 715 unmodified lines
716716
717717 struct sctp_strreset_outreq {
718718 struct sctp_paramhdr param_hdr;
719− __u32 request_seq;
720− __u32 response_seq;
721− __u32 send_reset_at_tsn;
722− __u16 list_of_streams[0];
719+ __be32 request_seq;
720+ __be32 response_seq;
721+ __be32 send_reset_at_tsn;
722+ __be16 list_of_streams[0];
723723 };
724724
725725 struct sctp_strreset_inreq {
726726 struct sctp_paramhdr param_hdr;
727− __u32 request_seq;
728− __u16 list_of_streams[0];
727+ __be32 request_seq;
728+ __be16 list_of_streams[0];
729729 };
730730
731731 struct sctp_strreset_tsnreq {
732732 struct sctp_paramhdr param_hdr;
733− __u32 request_seq;
733+ __be32 request_seq;
734734 };
735735
736736 struct sctp_strreset_addstrm {
737737 struct sctp_paramhdr param_hdr;
738− __u32 request_seq;
739− __u16 number_of_streams;
740− __u16 reserved;
738+ __be32 request_seq;
739+ __be16 number_of_streams;
740+ __be16 reserved;
741741 };
742742
743743 enum {
@@ -752,16 +752,16 @@ enum { · 8 unmodified lines
752752
753753 struct sctp_strreset_resp {
754754 struct sctp_paramhdr param_hdr;
755− __u32 response_seq;
756− __u32 result;
755+ __be32 response_seq;
756+ __be32 result;
757757 };
758758
759759 struct sctp_strreset_resptsn {
760760 struct sctp_paramhdr param_hdr;
761− __u32 response_seq;
762− __u32 result;
763− __u32 senders_next_tsn;
764− __u32 receivers_next_tsn;
761+ __be32 response_seq;
762+ __be32 result;
763+ __be32 senders_next_tsn;
764+ __be32 receivers_next_tsn;
765765 };
766766
767767 #endif /* __LINUX_SCTP_H__ */