* 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)
status.sstat_outstrms = asoc->c.sinit_num_ostreams;
status.sstat_fragmentation_point = asoc->frag_point;
status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc);
- flip_to_n((union sctp_addr *)&status.sstat_primary.spinfo_address,
- &transport->ipaddr_h);
+ memcpy(&status.sstat_primary.spinfo_address, &transport->ipaddr,
+ transport->af_specific->sockaddr_len);
/* Map ipv4 address into v4-mapped-on-v6 address. */
sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk),
(union sctp_addr *)&status.sstat_primary.spinfo_address);
if (!asoc->peer.primary_path)
return -ENOTCONN;
- flip_to_n((union sctp_addr *)&prim.ssp_addr,
- &asoc->peer.primary_path->ipaddr_h);
+ memcpy(&prim.ssp_addr, &asoc->peer.primary_path->ipaddr,
+ asoc->peer.primary_path->af_specific->sockaddr_len);
sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp,
(union sctp_addr *)&prim.ssp_addr);