[SCTP] embedded sctp_addr: net-endian mirrors

Add sctp_chunk->source, sctp_sockaddr_entry->a, sctp_transport->ipaddr
and sctp_transport->saddr, maintain them as net-endian mirrors of
their host-endian counterparts.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Al Viro 2006-11-20 17:04:42 -08:00 committed by David S. Miller
parent 09ef7fecea
commit 2a6fd78ade
6 changed files with 19 additions and 7 deletions

View file

@ -150,9 +150,10 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist,
/* Add the address to the local list. */
addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC);
if (addr) {
addr->a_h.v4.sin_family = AF_INET;
addr->a_h.v4.sin_port = 0;
addr->a_h.v4.sin_addr.s_addr = ifa->ifa_local;
addr->a.v4.sin_family = AF_INET;
addr->a.v4.sin_port = 0;
addr->a.v4.sin_addr.s_addr = ifa->ifa_local;
addr->a_h = addr->a;
list_add_tail(&addr->list, addrlist);
}
}