unsigned long sent_at;
/* What is the origin IP address for this chunk? */
+ union sctp_addr source;
union sctp_addr source_h;
/* Destination address for this chunk. */
union sctp_addr dest;
/* This is a structure for holding either an IPv6 or an IPv4 address. */
struct sctp_sockaddr_entry {
struct list_head list;
+ union sctp_addr a;
union sctp_addr a_h;
__u8 use_as_src;
};
int dead;
/* This is the peer's IP address and port. */
+ union sctp_addr ipaddr;
union sctp_addr ipaddr_h;
/* These are the functions we call to handle LLP stuff. */
/* Destination */
struct dst_entry *dst;
/* Source address. */
+ union sctp_addr saddr;
union sctp_addr saddr_h;
/* When was the last time(in jiffies) that a data packet was sent on
if (!addr->a_h.v4.sin_port)
addr->a_h.v4.sin_port = bp->port;
+ flip_to_n(&addr->a, &addr->a_h);
+
addr->use_as_src = use_as_src;
INIT_LIST_HEAD(&addr->list);
/* Add the address to the local list. */
addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC);
if (addr) {
- addr->a_h.v6.sin6_family = AF_INET6;
- addr->a_h.v6.sin6_port = 0;
- addr->a_h.v6.sin6_addr = ifp->addr;
- addr->a_h.v6.sin6_scope_id = dev->ifindex;
+ addr->a.v6.sin6_family = AF_INET6;
+ addr->a.v6.sin6_port = 0;
+ addr->a.v6.sin6_addr = ifp->addr;
+ addr->a.v6.sin6_scope_id = dev->ifindex;
+ addr->a_h = addr->a;
INIT_LIST_HEAD(&addr->list);
list_add_tail(&addr->list, 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);
}
}
union sctp_addr *dest)
{
memcpy(&chunk->source_h, src, sizeof(union sctp_addr));
+ flip_to_n(&chunk->source, &chunk->source_h);
memcpy(&chunk->dest, dest, sizeof(union sctp_addr));
}
{
/* Copy in the address. */
peer->ipaddr_h = *addr;
+ flip_to_n(&peer->ipaddr, &peer->ipaddr_h);
peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
peer->asoc = NULL;
peer->dst = NULL;
+ memset(&peer->saddr, 0, sizeof(union sctp_addr));
memset(&peer->saddr_h, 0, sizeof(union sctp_addr));
/* From 6.3.1 RTO Calculation:
memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
else
af->get_saddr(asoc, dst, daddr, &transport->saddr_h);
+ flip_to_n(&transport->saddr, &transport->saddr_h);
transport->dst = dst;
if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {