From 8cec6b80664eb20b0c033fd20d2c7ed15621437f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 20 Nov 2006 17:23:01 -0800 Subject: [SCTP]: We need to be careful when copying to sockaddr_storage. Signed-off-by: Al Viro Signed-off-by: David S. Miller --- net/sctp/associola.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/sctp/associola.c') diff --git a/net/sctp/associola.c b/net/sctp/associola.c index fa7cda4b1813..39471d3b31b9 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -733,7 +733,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, * user. */ memset(&addr, 0, sizeof(struct sockaddr_storage)); - flip_to_n((union sctp_addr *)&addr, &transport->ipaddr_h); + memcpy(&addr, &transport->ipaddr, transport->af_specific->sockaddr_len); event = sctp_ulpevent_make_peer_addr_change(asoc, &addr, 0, spc_state, error, GFP_ATOMIC); if (event) -- cgit v1.2.3