sctp: fix a type cast warnings that causes a_rwnd gets the wrong value
[sfrench/cifs-2.6.git] / net / sctp / sm_sideeffect.c
index e6a2974e020e1a4232d94e6c2933eebff5f8acb4..8f2762bba879def9e7a37bebbff8d120cfb5157f 100644 (file)
@@ -1680,8 +1680,8 @@ static int sctp_cmd_interpreter(enum sctp_event event_type,
                case SCTP_CMD_PROCESS_CTSN:
                        /* Dummy up a SACK for processing. */
                        sackh.cum_tsn_ack = cmd->obj.be32;
-                       sackh.a_rwnd = asoc->peer.rwnd +
-                                       asoc->outqueue.outstanding_bytes;
+                       sackh.a_rwnd = htonl(asoc->peer.rwnd +
+                                            asoc->outqueue.outstanding_bytes);
                        sackh.num_gap_ack_blocks = 0;
                        sackh.num_dup_tsns = 0;
                        chunk->subh.sack_hdr = &sackh;