From: Vlad Yasevich Date: Mon, 15 Sep 2008 20:29:49 +0000 (-0400) Subject: sctp: correctly save sctp_adaptation from parameter. X-Git-Tag: firefly_0821_release~17825^2~141 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e69c4e0f1210450841e40716894ba6a877b31d52;p=firefly-linux-kernel-4.4.55.git sctp: correctly save sctp_adaptation from parameter. The INIT perameter carries the adapatation value in network-byte order. We need to store it in host byte order as expected by data types and the user API. Signed-off-by: Vlad Yasevich --- diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 99fe0747cc96..76726bcff3e9 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -2467,7 +2467,7 @@ do_addr_param: break; case SCTP_PARAM_ADAPTATION_LAYER_IND: - asoc->peer.adaptation_ind = param.aind->adaptation_ind; + asoc->peer.adaptation_ind = ntohl(param.aind->adaptation_ind); break; case SCTP_PARAM_SET_PRIMARY: