sctp: translate network order to host order when users get a hmacid
authorXin Long <lucien.xin@gmail.com>
Wed, 3 Feb 2016 15:33:30 +0000 (23:33 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 27 Feb 2016 14:28:48 +0000 (14:28 +0000)
commit152e8fcbc0e7102a037b0dfd7551bb95e289ce16
tree0dc7f5b086a991fd1bbc395a51cc8b0e6eb156df
parentece1929f327a316ef9b84cb548ad86b851786ea1
sctp: translate network order to host order when users get a hmacid

commit 7a84bd46647ff181eb2659fdc99590e6f16e501d upstream.

Commit ed5a377d87dc ("sctp: translate host order to network order when
setting a hmacid") corrected the hmacid byte-order when setting a hmacid.
but the same issue also exists on getting a hmacid.

We fix it by changing hmacids to host order when users get them with
getsockopt.

Fixes: Commit ed5a377d87dc ("sctp: translate host order to network order when setting a hmacid")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/sctp/socket.c