diff options
-rw-r--r-- | include/net/sctp/structs.h | 8 | ||||
-rw-r--r-- | net/sctp/associola.c | 30 | ||||
-rw-r--r-- | net/sctp/bind_addr.c | 22 | ||||
-rw-r--r-- | net/sctp/endpointola.c | 2 | ||||
-rw-r--r-- | net/sctp/ipv6.c | 24 | ||||
-rw-r--r-- | net/sctp/proc.c | 6 | ||||
-rw-r--r-- | net/sctp/protocol.c | 20 | ||||
-rw-r--r-- | net/sctp/sm_make_chunk.c | 8 | ||||
-rw-r--r-- | net/sctp/sm_sideeffect.c | 8 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 8 | ||||
-rw-r--r-- | net/sctp/socket.c | 32 | ||||
-rw-r--r-- | net/sctp/transport.c | 14 |
12 files changed, 91 insertions, 91 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 2aa61ac9a9f3..953a73f9689c 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -713,7 +713,7 @@ struct sctp_chunk { | |||
713 | unsigned long sent_at; | 713 | unsigned long sent_at; |
714 | 714 | ||
715 | /* What is the origin IP address for this chunk? */ | 715 | /* What is the origin IP address for this chunk? */ |
716 | union sctp_addr source; | 716 | union sctp_addr source_h; |
717 | /* Destination address for this chunk. */ | 717 | /* Destination address for this chunk. */ |
718 | union sctp_addr dest; | 718 | union sctp_addr dest; |
719 | 719 | ||
@@ -756,7 +756,7 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | |||
756 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 756 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
757 | struct sctp_sockaddr_entry { | 757 | struct sctp_sockaddr_entry { |
758 | struct list_head list; | 758 | struct list_head list; |
759 | union sctp_addr a; | 759 | union sctp_addr a_h; |
760 | __u8 use_as_src; | 760 | __u8 use_as_src; |
761 | }; | 761 | }; |
762 | 762 | ||
@@ -842,7 +842,7 @@ struct sctp_transport { | |||
842 | int dead; | 842 | int dead; |
843 | 843 | ||
844 | /* This is the peer's IP address and port. */ | 844 | /* This is the peer's IP address and port. */ |
845 | union sctp_addr ipaddr; | 845 | union sctp_addr ipaddr_h; |
846 | 846 | ||
847 | /* These are the functions we call to handle LLP stuff. */ | 847 | /* These are the functions we call to handle LLP stuff. */ |
848 | struct sctp_af *af_specific; | 848 | struct sctp_af *af_specific; |
@@ -900,7 +900,7 @@ struct sctp_transport { | |||
900 | /* Destination */ | 900 | /* Destination */ |
901 | struct dst_entry *dst; | 901 | struct dst_entry *dst; |
902 | /* Source address. */ | 902 | /* Source address. */ |
903 | union sctp_addr saddr; | 903 | union sctp_addr saddr_h; |
904 | 904 | ||
905 | /* When was the last time(in jiffies) that a data packet was sent on | 905 | /* When was the last time(in jiffies) that a data packet was sent on |
906 | * this transport? This is used to adjust the cwnd when the transport | 906 | * this transport? This is used to adjust the cwnd when the transport |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 746b0b0f5ace..83318e727905 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -442,7 +442,7 @@ void sctp_assoc_set_primary(struct sctp_association *asoc, | |||
442 | asoc->peer.primary_path = transport; | 442 | asoc->peer.primary_path = transport; |
443 | 443 | ||
444 | /* Set a default msg_name for events. */ | 444 | /* Set a default msg_name for events. */ |
445 | memcpy(&asoc->peer.primary_addr, &transport->ipaddr, | 445 | memcpy(&asoc->peer.primary_addr, &transport->ipaddr_h, |
446 | sizeof(union sctp_addr)); | 446 | sizeof(union sctp_addr)); |
447 | 447 | ||
448 | /* If the primary path is changing, assume that the | 448 | /* If the primary path is changing, assume that the |
@@ -487,8 +487,8 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, | |||
487 | SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_rm_peer:association %p addr: ", | 487 | SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_rm_peer:association %p addr: ", |
488 | " port: %d\n", | 488 | " port: %d\n", |
489 | asoc, | 489 | asoc, |
490 | (&peer->ipaddr), | 490 | (&peer->ipaddr_h), |
491 | peer->ipaddr.v4.sin_port); | 491 | peer->ipaddr_h.v4.sin_port); |
492 | 492 | ||
493 | /* If we are to remove the current retran_path, update it | 493 | /* If we are to remove the current retran_path, update it |
494 | * to the next peer before removing this peer from the list. | 494 | * to the next peer before removing this peer from the list. |
@@ -669,7 +669,7 @@ void sctp_assoc_del_peer(struct sctp_association *asoc, | |||
669 | 669 | ||
670 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 670 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
671 | transport = list_entry(pos, struct sctp_transport, transports); | 671 | transport = list_entry(pos, struct sctp_transport, transports); |
672 | if (sctp_cmp_addr_exact(addr, &transport->ipaddr)) { | 672 | if (sctp_cmp_addr_exact(addr, &transport->ipaddr_h)) { |
673 | /* Do book keeping for removing the peer and free it. */ | 673 | /* Do book keeping for removing the peer and free it. */ |
674 | sctp_assoc_rm_peer(asoc, transport); | 674 | sctp_assoc_rm_peer(asoc, transport); |
675 | break; | 675 | break; |
@@ -689,7 +689,7 @@ struct sctp_transport *sctp_assoc_lookup_paddr( | |||
689 | 689 | ||
690 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 690 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
691 | t = list_entry(pos, struct sctp_transport, transports); | 691 | t = list_entry(pos, struct sctp_transport, transports); |
692 | if (sctp_cmp_addr_exact(address, &t->ipaddr)) | 692 | if (sctp_cmp_addr_exact(address, &t->ipaddr_h)) |
693 | return t; | 693 | return t; |
694 | } | 694 | } |
695 | 695 | ||
@@ -733,7 +733,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, | |||
733 | * user. | 733 | * user. |
734 | */ | 734 | */ |
735 | memset(&addr, 0, sizeof(struct sockaddr_storage)); | 735 | memset(&addr, 0, sizeof(struct sockaddr_storage)); |
736 | flip_to_n((union sctp_addr *)&addr, &transport->ipaddr); | 736 | flip_to_n((union sctp_addr *)&addr, &transport->ipaddr_h); |
737 | event = sctp_ulpevent_make_peer_addr_change(asoc, &addr, | 737 | event = sctp_ulpevent_make_peer_addr_change(asoc, &addr, |
738 | 0, spc_state, error, GFP_ATOMIC); | 738 | 0, spc_state, error, GFP_ATOMIC); |
739 | if (event) | 739 | if (event) |
@@ -1043,8 +1043,8 @@ void sctp_assoc_update(struct sctp_association *asoc, | |||
1043 | /* Remove any peer addresses not present in the new association. */ | 1043 | /* Remove any peer addresses not present in the new association. */ |
1044 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 1044 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
1045 | trans = list_entry(pos, struct sctp_transport, transports); | 1045 | trans = list_entry(pos, struct sctp_transport, transports); |
1046 | if (!sctp_assoc_lookup_paddr(new, &trans->ipaddr)) | 1046 | if (!sctp_assoc_lookup_paddr(new, &trans->ipaddr_h)) |
1047 | sctp_assoc_del_peer(asoc, &trans->ipaddr); | 1047 | sctp_assoc_del_peer(asoc, &trans->ipaddr_h); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | /* If the case is A (association restart), use | 1050 | /* If the case is A (association restart), use |
@@ -1067,8 +1067,8 @@ void sctp_assoc_update(struct sctp_association *asoc, | |||
1067 | list_for_each(pos, &new->peer.transport_addr_list) { | 1067 | list_for_each(pos, &new->peer.transport_addr_list) { |
1068 | trans = list_entry(pos, struct sctp_transport, | 1068 | trans = list_entry(pos, struct sctp_transport, |
1069 | transports); | 1069 | transports); |
1070 | if (!sctp_assoc_lookup_paddr(asoc, &trans->ipaddr)) | 1070 | if (!sctp_assoc_lookup_paddr(asoc, &trans->ipaddr_h)) |
1071 | sctp_assoc_add_peer(asoc, &trans->ipaddr, | 1071 | sctp_assoc_add_peer(asoc, &trans->ipaddr_h, |
1072 | GFP_ATOMIC, trans->state); | 1072 | GFP_ATOMIC, trans->state); |
1073 | } | 1073 | } |
1074 | 1074 | ||
@@ -1136,8 +1136,8 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1136 | " %p addr: ", | 1136 | " %p addr: ", |
1137 | " port: %d\n", | 1137 | " port: %d\n", |
1138 | asoc, | 1138 | asoc, |
1139 | (&t->ipaddr), | 1139 | (&t->ipaddr_h), |
1140 | t->ipaddr.v4.sin_port); | 1140 | t->ipaddr_h.v4.sin_port); |
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | /* Choose the transport for sending a INIT packet. */ | 1143 | /* Choose the transport for sending a INIT packet. */ |
@@ -1161,8 +1161,8 @@ struct sctp_transport *sctp_assoc_choose_init_transport( | |||
1161 | " %p addr: ", | 1161 | " %p addr: ", |
1162 | " port: %d\n", | 1162 | " port: %d\n", |
1163 | asoc, | 1163 | asoc, |
1164 | (&t->ipaddr), | 1164 | (&t->ipaddr_h), |
1165 | t->ipaddr.v4.sin_port); | 1165 | t->ipaddr_h.v4.sin_port); |
1166 | 1166 | ||
1167 | return t; | 1167 | return t; |
1168 | } | 1168 | } |
@@ -1307,7 +1307,7 @@ int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, | |||
1307 | /* Use scoping rules to determine the subset of addresses from | 1307 | /* Use scoping rules to determine the subset of addresses from |
1308 | * the endpoint. | 1308 | * the endpoint. |
1309 | */ | 1309 | */ |
1310 | scope = sctp_scope(&asoc->peer.active_path->ipaddr); | 1310 | scope = sctp_scope(&asoc->peer.active_path->ipaddr_h); |
1311 | flags = (PF_INET6 == asoc->base.sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0; | 1311 | flags = (PF_INET6 == asoc->base.sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0; |
1312 | if (asoc->peer.ipv4_address) | 1312 | if (asoc->peer.ipv4_address) |
1313 | flags |= SCTP_ADDR4_PEERSUPP; | 1313 | flags |= SCTP_ADDR4_PEERSUPP; |
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 23b5b664a8a0..b8115cb31ae3 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -77,7 +77,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
77 | /* Extract the addresses which are relevant for this scope. */ | 77 | /* Extract the addresses which are relevant for this scope. */ |
78 | list_for_each(pos, &src->address_list) { | 78 | list_for_each(pos, &src->address_list) { |
79 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 79 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
80 | error = sctp_copy_one_addr(dest, &addr->a, scope, | 80 | error = sctp_copy_one_addr(dest, &addr->a_h, scope, |
81 | gfp, flags); | 81 | gfp, flags); |
82 | if (error < 0) | 82 | if (error < 0) |
83 | goto out; | 83 | goto out; |
@@ -91,7 +91,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
91 | list_for_each(pos, &src->address_list) { | 91 | list_for_each(pos, &src->address_list) { |
92 | addr = list_entry(pos, struct sctp_sockaddr_entry, | 92 | addr = list_entry(pos, struct sctp_sockaddr_entry, |
93 | list); | 93 | list); |
94 | error = sctp_copy_one_addr(dest, &addr->a, | 94 | error = sctp_copy_one_addr(dest, &addr->a_h, |
95 | SCTP_SCOPE_LINK, gfp, | 95 | SCTP_SCOPE_LINK, gfp, |
96 | flags); | 96 | flags); |
97 | if (error < 0) | 97 | if (error < 0) |
@@ -155,13 +155,13 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, | |||
155 | if (!addr) | 155 | if (!addr) |
156 | return -ENOMEM; | 156 | return -ENOMEM; |
157 | 157 | ||
158 | memcpy(&addr->a, new, sizeof(*new)); | 158 | memcpy(&addr->a_h, new, sizeof(*new)); |
159 | 159 | ||
160 | /* Fix up the port if it has not yet been set. | 160 | /* Fix up the port if it has not yet been set. |
161 | * Both v4 and v6 have the port at the same offset. | 161 | * Both v4 and v6 have the port at the same offset. |
162 | */ | 162 | */ |
163 | if (!addr->a.v4.sin_port) | 163 | if (!addr->a_h.v4.sin_port) |
164 | addr->a.v4.sin_port = bp->port; | 164 | addr->a_h.v4.sin_port = bp->port; |
165 | 165 | ||
166 | addr->use_as_src = use_as_src; | 166 | addr->use_as_src = use_as_src; |
167 | 167 | ||
@@ -182,7 +182,7 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) | |||
182 | 182 | ||
183 | list_for_each_safe(pos, temp, &bp->address_list) { | 183 | list_for_each_safe(pos, temp, &bp->address_list) { |
184 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 184 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
185 | if (sctp_cmp_addr_exact(&addr->a, del_addr)) { | 185 | if (sctp_cmp_addr_exact(&addr->a_h, del_addr)) { |
186 | /* Found the exact match. */ | 186 | /* Found the exact match. */ |
187 | list_del(pos); | 187 | list_del(pos); |
188 | kfree(addr); | 188 | kfree(addr); |
@@ -237,8 +237,8 @@ union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, | |||
237 | 237 | ||
238 | list_for_each(pos, &bp->address_list) { | 238 | list_for_each(pos, &bp->address_list) { |
239 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 239 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
240 | af = sctp_get_af_specific(addr->a.v4.sin_family); | 240 | af = sctp_get_af_specific(addr->a_h.v4.sin_family); |
241 | len = af->to_addr_param(&addr->a, &rawaddr); | 241 | len = af->to_addr_param(&addr->a_h, &rawaddr); |
242 | memcpy(addrparms.v, &rawaddr, len); | 242 | memcpy(addrparms.v, &rawaddr, len); |
243 | addrparms.v += len; | 243 | addrparms.v += len; |
244 | addrparms_len += len; | 244 | addrparms_len += len; |
@@ -305,7 +305,7 @@ int sctp_bind_addr_match(struct sctp_bind_addr *bp, | |||
305 | 305 | ||
306 | list_for_each(pos, &bp->address_list) { | 306 | list_for_each(pos, &bp->address_list) { |
307 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 307 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); |
308 | if (opt->pf->cmp_addr(&laddr->a, addr, opt)) | 308 | if (opt->pf->cmp_addr(&laddr->a_h, addr, opt)) |
309 | return 1; | 309 | return 1; |
310 | } | 310 | } |
311 | 311 | ||
@@ -339,13 +339,13 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | |||
339 | return NULL; | 339 | return NULL; |
340 | flip_to_h(&tmp, addr); | 340 | flip_to_h(&tmp, addr); |
341 | 341 | ||
342 | if (opt->pf->cmp_addr(&laddr->a, &tmp, opt)) | 342 | if (opt->pf->cmp_addr(&laddr->a_h, &tmp, opt)) |
343 | break; | 343 | break; |
344 | 344 | ||
345 | addr_buf += af->sockaddr_len; | 345 | addr_buf += af->sockaddr_len; |
346 | } | 346 | } |
347 | if (i == addrcnt) | 347 | if (i == addrcnt) |
348 | return &laddr->a; | 348 | return &laddr->a_h; |
349 | } | 349 | } |
350 | 350 | ||
351 | return NULL; | 351 | return NULL; |
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 090f2b2a0cab..75904b037ec6 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c | |||
@@ -305,7 +305,7 @@ int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep, | |||
305 | bp = &ep->base.bind_addr; | 305 | bp = &ep->base.bind_addr; |
306 | list_for_each(pos, &bp->address_list) { | 306 | list_for_each(pos, &bp->address_list) { |
307 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 307 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
308 | if (sctp_has_association(&addr->a, paddr)) { | 308 | if (sctp_has_association(&addr->a_h, paddr)) { |
309 | sctp_read_unlock(&ep->base.addr_lock); | 309 | sctp_read_unlock(&ep->base.addr_lock); |
310 | return 1; | 310 | return 1; |
311 | } | 311 | } |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 1f9f5ec07595..e533970fa335 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -161,17 +161,17 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport, | |||
161 | /* Fill in the dest address from the route entry passed with the skb | 161 | /* Fill in the dest address from the route entry passed with the skb |
162 | * and the source address from the transport. | 162 | * and the source address from the transport. |
163 | */ | 163 | */ |
164 | ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr.v6.sin6_addr); | 164 | ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr_h.v6.sin6_addr); |
165 | ipv6_addr_copy(&fl.fl6_src, &transport->saddr.v6.sin6_addr); | 165 | ipv6_addr_copy(&fl.fl6_src, &transport->saddr_h.v6.sin6_addr); |
166 | 166 | ||
167 | fl.fl6_flowlabel = np->flow_label; | 167 | fl.fl6_flowlabel = np->flow_label; |
168 | IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel); | 168 | IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel); |
169 | if (ipv6_addr_type(&fl.fl6_src) & IPV6_ADDR_LINKLOCAL) | 169 | if (ipv6_addr_type(&fl.fl6_src) & IPV6_ADDR_LINKLOCAL) |
170 | fl.oif = transport->saddr.v6.sin6_scope_id; | 170 | fl.oif = transport->saddr_h.v6.sin6_scope_id; |
171 | else | 171 | else |
172 | fl.oif = sk->sk_bound_dev_if; | 172 | fl.oif = sk->sk_bound_dev_if; |
173 | fl.fl_ip_sport = inet_sk(sk)->sport; | 173 | fl.fl_ip_sport = inet_sk(sk)->sport; |
174 | fl.fl_ip_dport = transport->ipaddr.v6.sin6_port; | 174 | fl.fl_ip_dport = transport->ipaddr_h.v6.sin6_port; |
175 | 175 | ||
176 | if (np->opt && np->opt->srcrt) { | 176 | if (np->opt && np->opt->srcrt) { |
177 | struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; | 177 | struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; |
@@ -290,11 +290,11 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, | |||
290 | list_for_each(pos, &bp->address_list) { | 290 | list_for_each(pos, &bp->address_list) { |
291 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 291 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); |
292 | if ((laddr->use_as_src) && | 292 | if ((laddr->use_as_src) && |
293 | (laddr->a.sa.sa_family == AF_INET6) && | 293 | (laddr->a_h.sa.sa_family == AF_INET6) && |
294 | (scope <= sctp_scope(&laddr->a))) { | 294 | (scope <= sctp_scope(&laddr->a_h))) { |
295 | bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a); | 295 | bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a_h); |
296 | if (!baddr || (matchlen < bmatchlen)) { | 296 | if (!baddr || (matchlen < bmatchlen)) { |
297 | baddr = &laddr->a; | 297 | baddr = &laddr->a_h; |
298 | matchlen = bmatchlen; | 298 | matchlen = bmatchlen; |
299 | } | 299 | } |
300 | } | 300 | } |
@@ -332,10 +332,10 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, | |||
332 | /* Add the address to the local list. */ | 332 | /* Add the address to the local list. */ |
333 | addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC); | 333 | addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC); |
334 | if (addr) { | 334 | if (addr) { |
335 | addr->a.v6.sin6_family = AF_INET6; | 335 | addr->a_h.v6.sin6_family = AF_INET6; |
336 | addr->a.v6.sin6_port = 0; | 336 | addr->a_h.v6.sin6_port = 0; |
337 | addr->a.v6.sin6_addr = ifp->addr; | 337 | addr->a_h.v6.sin6_addr = ifp->addr; |
338 | addr->a.v6.sin6_scope_id = dev->ifindex; | 338 | addr->a_h.v6.sin6_scope_id = dev->ifindex; |
339 | INIT_LIST_HEAD(&addr->list); | 339 | INIT_LIST_HEAD(&addr->list); |
340 | list_add_tail(&addr->list, addrlist); | 340 | list_add_tail(&addr->list, addrlist); |
341 | } | 341 | } |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 7f49e769080e..47ccec565a24 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -155,12 +155,12 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo | |||
155 | if (epb->type == SCTP_EP_TYPE_ASSOCIATION) { | 155 | if (epb->type == SCTP_EP_TYPE_ASSOCIATION) { |
156 | asoc = sctp_assoc(epb); | 156 | asoc = sctp_assoc(epb); |
157 | peer = asoc->peer.primary_path; | 157 | peer = asoc->peer.primary_path; |
158 | primary = &peer->saddr; | 158 | primary = &peer->saddr_h; |
159 | } | 159 | } |
160 | 160 | ||
161 | list_for_each(pos, &epb->bind_addr.address_list) { | 161 | list_for_each(pos, &epb->bind_addr.address_list) { |
162 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 162 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); |
163 | addr = (union sctp_addr *)&laddr->a; | 163 | addr = (union sctp_addr *)&laddr->a_h; |
164 | af = sctp_get_af_specific(addr->sa.sa_family); | 164 | af = sctp_get_af_specific(addr->sa.sa_family); |
165 | if (primary && af->cmp_addr(addr, primary)) { | 165 | if (primary && af->cmp_addr(addr, primary)) { |
166 | seq_printf(seq, "*"); | 166 | seq_printf(seq, "*"); |
@@ -180,7 +180,7 @@ static void sctp_seq_dump_remote_addrs(struct seq_file *seq, struct sctp_associa | |||
180 | primary = &(assoc->peer.primary_addr); | 180 | primary = &(assoc->peer.primary_addr); |
181 | list_for_each(pos, &assoc->peer.transport_addr_list) { | 181 | list_for_each(pos, &assoc->peer.transport_addr_list) { |
182 | transport = list_entry(pos, struct sctp_transport, transports); | 182 | transport = list_entry(pos, struct sctp_transport, transports); |
183 | addr = (union sctp_addr *)&transport->ipaddr; | 183 | addr = (union sctp_addr *)&transport->ipaddr_h; |
184 | af = sctp_get_af_specific(addr->sa.sa_family); | 184 | af = sctp_get_af_specific(addr->sa.sa_family); |
185 | if (af->cmp_addr(addr, primary)) { | 185 | if (af->cmp_addr(addr, primary)) { |
186 | seq_printf(seq, "*"); | 186 | seq_printf(seq, "*"); |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 4310e7fac443..20883ffd51d9 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -150,9 +150,9 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist, | |||
150 | /* Add the address to the local list. */ | 150 | /* Add the address to the local list. */ |
151 | addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC); | 151 | addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC); |
152 | if (addr) { | 152 | if (addr) { |
153 | addr->a.v4.sin_family = AF_INET; | 153 | addr->a_h.v4.sin_family = AF_INET; |
154 | addr->a.v4.sin_port = 0; | 154 | addr->a_h.v4.sin_port = 0; |
155 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; | 155 | addr->a_h.v4.sin_addr.s_addr = ifa->ifa_local; |
156 | list_add_tail(&addr->list, addrlist); | 156 | list_add_tail(&addr->list, addrlist); |
157 | } | 157 | } |
158 | } | 158 | } |
@@ -223,17 +223,17 @@ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, | |||
223 | sctp_spin_lock_irqsave(&sctp_local_addr_lock, flags); | 223 | sctp_spin_lock_irqsave(&sctp_local_addr_lock, flags); |
224 | list_for_each(pos, &sctp_local_addr_list) { | 224 | list_for_each(pos, &sctp_local_addr_list) { |
225 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 225 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
226 | if (sctp_in_scope(&addr->a, scope)) { | 226 | if (sctp_in_scope(&addr->a_h, scope)) { |
227 | /* Now that the address is in scope, check to see if | 227 | /* Now that the address is in scope, check to see if |
228 | * the address type is really supported by the local | 228 | * the address type is really supported by the local |
229 | * sock as well as the remote peer. | 229 | * sock as well as the remote peer. |
230 | */ | 230 | */ |
231 | if ((((AF_INET == addr->a.sa.sa_family) && | 231 | if ((((AF_INET == addr->a_h.sa.sa_family) && |
232 | (copy_flags & SCTP_ADDR4_PEERSUPP))) || | 232 | (copy_flags & SCTP_ADDR4_PEERSUPP))) || |
233 | (((AF_INET6 == addr->a.sa.sa_family) && | 233 | (((AF_INET6 == addr->a_h.sa.sa_family) && |
234 | (copy_flags & SCTP_ADDR6_ALLOWED) && | 234 | (copy_flags & SCTP_ADDR6_ALLOWED) && |
235 | (copy_flags & SCTP_ADDR6_PEERSUPP)))) { | 235 | (copy_flags & SCTP_ADDR6_PEERSUPP)))) { |
236 | error = sctp_add_bind_addr(bp, &addr->a, 1, | 236 | error = sctp_add_bind_addr(bp, &addr->a_h, 1, |
237 | GFP_ATOMIC); | 237 | GFP_ATOMIC); |
238 | if (error) | 238 | if (error) |
239 | goto end_copy; | 239 | goto end_copy; |
@@ -482,7 +482,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, | |||
482 | if (!laddr->use_as_src) | 482 | if (!laddr->use_as_src) |
483 | continue; | 483 | continue; |
484 | sctp_v4_dst_saddr(&dst_saddr, dst, bp->port); | 484 | sctp_v4_dst_saddr(&dst_saddr, dst, bp->port); |
485 | if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) | 485 | if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a_h)) |
486 | goto out_unlock; | 486 | goto out_unlock; |
487 | } | 487 | } |
488 | sctp_read_unlock(addr_lock); | 488 | sctp_read_unlock(addr_lock); |
@@ -502,8 +502,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, | |||
502 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 502 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); |
503 | 503 | ||
504 | if ((laddr->use_as_src) && | 504 | if ((laddr->use_as_src) && |
505 | (AF_INET == laddr->a.sa.sa_family)) { | 505 | (AF_INET == laddr->a_h.sa.sa_family)) { |
506 | fl.fl4_src = laddr->a.v4.sin_addr.s_addr; | 506 | fl.fl4_src = laddr->a_h.v4.sin_addr.s_addr; |
507 | if (!ip_route_output_key(&rt, &fl)) { | 507 | if (!ip_route_output_key(&rt, &fl)) { |
508 | dst = &rt->u.dst; | 508 | dst = &rt->u.dst; |
509 | goto out_unlock; | 509 | goto out_unlock; |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index ccbba6b24d1d..13109cfc3ae5 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1031,7 +1031,7 @@ nodata: | |||
1031 | void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src, | 1031 | void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src, |
1032 | union sctp_addr *dest) | 1032 | union sctp_addr *dest) |
1033 | { | 1033 | { |
1034 | memcpy(&chunk->source, src, sizeof(union sctp_addr)); | 1034 | memcpy(&chunk->source_h, src, sizeof(union sctp_addr)); |
1035 | memcpy(&chunk->dest, dest, sizeof(union sctp_addr)); | 1035 | memcpy(&chunk->dest, dest, sizeof(union sctp_addr)); |
1036 | } | 1036 | } |
1037 | 1037 | ||
@@ -1040,10 +1040,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk) | |||
1040 | { | 1040 | { |
1041 | /* If we have a known transport, use that. */ | 1041 | /* If we have a known transport, use that. */ |
1042 | if (chunk->transport) { | 1042 | if (chunk->transport) { |
1043 | return &chunk->transport->ipaddr; | 1043 | return &chunk->transport->ipaddr_h; |
1044 | } else { | 1044 | } else { |
1045 | /* Otherwise, extract it from the IP header. */ | 1045 | /* Otherwise, extract it from the IP header. */ |
1046 | return &chunk->source; | 1046 | return &chunk->source_h; |
1047 | } | 1047 | } |
1048 | } | 1048 | } |
1049 | 1049 | ||
@@ -2594,7 +2594,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, | |||
2594 | sctp_write_lock(&asoc->base.addr_lock); | 2594 | sctp_write_lock(&asoc->base.addr_lock); |
2595 | list_for_each(pos, &bp->address_list) { | 2595 | list_for_each(pos, &bp->address_list) { |
2596 | saddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 2596 | saddr = list_entry(pos, struct sctp_sockaddr_entry, list); |
2597 | if (sctp_cmp_addr_exact(&saddr->a, &addr)) | 2597 | if (sctp_cmp_addr_exact(&saddr->a_h, &addr)) |
2598 | saddr->use_as_src = 1; | 2598 | saddr->use_as_src = 1; |
2599 | } | 2599 | } |
2600 | sctp_write_unlock(&asoc->base.addr_lock); | 2600 | sctp_write_unlock(&asoc->base.addr_lock); |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 2423b8ef9ce0..e1c5cddf32da 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -441,8 +441,8 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, | |||
441 | SCTP_DEBUG_PRINTK_IPADDR("transport_strike:association %p", | 441 | SCTP_DEBUG_PRINTK_IPADDR("transport_strike:association %p", |
442 | " transport IP: port:%d failed.\n", | 442 | " transport IP: port:%d failed.\n", |
443 | asoc, | 443 | asoc, |
444 | (&transport->ipaddr), | 444 | (&transport->ipaddr_h), |
445 | transport->ipaddr.v4.sin_port); | 445 | transport->ipaddr_h.v4.sin_port); |
446 | sctp_assoc_control_transport(asoc, transport, | 446 | sctp_assoc_control_transport(asoc, transport, |
447 | SCTP_TRANSPORT_DOWN, | 447 | SCTP_TRANSPORT_DOWN, |
448 | SCTP_FAILED_THRESHOLD); | 448 | SCTP_FAILED_THRESHOLD); |
@@ -833,9 +833,9 @@ static void sctp_cmd_del_non_primary(struct sctp_association *asoc) | |||
833 | 833 | ||
834 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 834 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
835 | t = list_entry(pos, struct sctp_transport, transports); | 835 | t = list_entry(pos, struct sctp_transport, transports); |
836 | if (!sctp_cmp_addr_exact(&t->ipaddr, | 836 | if (!sctp_cmp_addr_exact(&t->ipaddr_h, |
837 | &asoc->peer.primary_addr)) { | 837 | &asoc->peer.primary_addr)) { |
838 | sctp_assoc_del_peer(asoc, &t->ipaddr); | 838 | sctp_assoc_del_peer(asoc, &t->ipaddr_h); |
839 | } | 839 | } |
840 | } | 840 | } |
841 | 841 | ||
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index b70e3258b6d3..f46072767549 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -852,7 +852,7 @@ static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep, | |||
852 | 852 | ||
853 | hbinfo.param_hdr.type = SCTP_PARAM_HEARTBEAT_INFO; | 853 | hbinfo.param_hdr.type = SCTP_PARAM_HEARTBEAT_INFO; |
854 | hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t)); | 854 | hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t)); |
855 | hbinfo.daddr = transport->ipaddr; | 855 | hbinfo.daddr = transport->ipaddr_h; |
856 | hbinfo.sent_at = jiffies; | 856 | hbinfo.sent_at = jiffies; |
857 | hbinfo.hb_nonce = transport->hb_nonce; | 857 | hbinfo.hb_nonce = transport->hb_nonce; |
858 | 858 | ||
@@ -1167,8 +1167,8 @@ static int sctp_sf_check_restart_addrs(const struct sctp_association *new_asoc, | |||
1167 | list_for_each(pos2, &asoc->peer.transport_addr_list) { | 1167 | list_for_each(pos2, &asoc->peer.transport_addr_list) { |
1168 | addr = list_entry(pos2, struct sctp_transport, | 1168 | addr = list_entry(pos2, struct sctp_transport, |
1169 | transports); | 1169 | transports); |
1170 | if (sctp_cmp_addr_exact(&new_addr->ipaddr, | 1170 | if (sctp_cmp_addr_exact(&new_addr->ipaddr_h, |
1171 | &addr->ipaddr)) { | 1171 | &addr->ipaddr_h)) { |
1172 | found = 1; | 1172 | found = 1; |
1173 | break; | 1173 | break; |
1174 | } | 1174 | } |
@@ -1179,7 +1179,7 @@ static int sctp_sf_check_restart_addrs(const struct sctp_association *new_asoc, | |||
1179 | 1179 | ||
1180 | /* If a new address was added, ABORT the sender. */ | 1180 | /* If a new address was added, ABORT the sender. */ |
1181 | if (!found && new_addr) { | 1181 | if (!found && new_addr) { |
1182 | sctp_sf_send_restart_abort(&new_addr->ipaddr, init, commands); | 1182 | sctp_sf_send_restart_abort(&new_addr->ipaddr_h, init, commands); |
1183 | } | 1183 | } |
1184 | 1184 | ||
1185 | /* Return success if all addresses were found. */ | 1185 | /* Return success if all addresses were found. */ |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index b6e038a387c2..459f32c5c3ae 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -551,7 +551,7 @@ static int sctp_send_asconf_add_ip(struct sock *sk, | |||
551 | laddr = list_entry(p, struct sctp_sockaddr_entry, list); | 551 | laddr = list_entry(p, struct sctp_sockaddr_entry, list); |
552 | sctp_read_unlock(&asoc->base.addr_lock); | 552 | sctp_read_unlock(&asoc->base.addr_lock); |
553 | 553 | ||
554 | chunk = sctp_make_asconf_update_ip(asoc, &laddr->a, addrs, | 554 | chunk = sctp_make_asconf_update_ip(asoc, &laddr->a_h, addrs, |
555 | addrcnt, SCTP_PARAM_ADD_IP); | 555 | addrcnt, SCTP_PARAM_ADD_IP); |
556 | if (!chunk) { | 556 | if (!chunk) { |
557 | retval = -ENOMEM; | 557 | retval = -ENOMEM; |
@@ -779,7 +779,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk, | |||
779 | saddr = list_entry(pos1, | 779 | saddr = list_entry(pos1, |
780 | struct sctp_sockaddr_entry, | 780 | struct sctp_sockaddr_entry, |
781 | list); | 781 | list); |
782 | if (sctp_cmp_addr_exact(&saddr->a, &saveaddr)) | 782 | if (sctp_cmp_addr_exact(&saddr->a_h, &saveaddr)) |
783 | saddr->use_as_src = 0; | 783 | saddr->use_as_src = 0; |
784 | } | 784 | } |
785 | addr_buf += af->sockaddr_len; | 785 | addr_buf += af->sockaddr_len; |
@@ -3218,7 +3218,7 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len, | |||
3218 | status.sstat_fragmentation_point = asoc->frag_point; | 3218 | status.sstat_fragmentation_point = asoc->frag_point; |
3219 | status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc); | 3219 | status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc); |
3220 | flip_to_n((union sctp_addr *)&status.sstat_primary.spinfo_address, | 3220 | flip_to_n((union sctp_addr *)&status.sstat_primary.spinfo_address, |
3221 | &transport->ipaddr); | 3221 | &transport->ipaddr_h); |
3222 | /* Map ipv4 address into v4-mapped-on-v6 address. */ | 3222 | /* Map ipv4 address into v4-mapped-on-v6 address. */ |
3223 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), | 3223 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), |
3224 | (union sctp_addr *)&status.sstat_primary.spinfo_address); | 3224 | (union sctp_addr *)&status.sstat_primary.spinfo_address); |
@@ -3767,7 +3767,7 @@ static int sctp_getsockopt_peer_addrs_old(struct sock *sk, int len, | |||
3767 | to = (void __user *)getaddrs.addrs; | 3767 | to = (void __user *)getaddrs.addrs; |
3768 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 3768 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
3769 | from = list_entry(pos, struct sctp_transport, transports); | 3769 | from = list_entry(pos, struct sctp_transport, transports); |
3770 | memcpy(&temp, &from->ipaddr, sizeof(temp)); | 3770 | memcpy(&temp, &from->ipaddr_h, sizeof(temp)); |
3771 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); | 3771 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); |
3772 | addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; | 3772 | addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; |
3773 | temp.v4.sin_port = htons(temp.v4.sin_port); | 3773 | temp.v4.sin_port = htons(temp.v4.sin_port); |
@@ -3816,7 +3816,7 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len, | |||
3816 | 3816 | ||
3817 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 3817 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
3818 | from = list_entry(pos, struct sctp_transport, transports); | 3818 | from = list_entry(pos, struct sctp_transport, transports); |
3819 | memcpy(&temp, &from->ipaddr, sizeof(temp)); | 3819 | memcpy(&temp, &from->ipaddr_h, sizeof(temp)); |
3820 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); | 3820 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); |
3821 | addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; | 3821 | addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; |
3822 | if(space_left < addrlen) | 3822 | if(space_left < addrlen) |
@@ -3882,14 +3882,14 @@ static int sctp_getsockopt_local_addrs_num_old(struct sock *sk, int len, | |||
3882 | if (sctp_list_single_entry(&bp->address_list)) { | 3882 | if (sctp_list_single_entry(&bp->address_list)) { |
3883 | addr = list_entry(bp->address_list.next, | 3883 | addr = list_entry(bp->address_list.next, |
3884 | struct sctp_sockaddr_entry, list); | 3884 | struct sctp_sockaddr_entry, list); |
3885 | if (sctp_is_any(&addr->a)) { | 3885 | if (sctp_is_any(&addr->a_h)) { |
3886 | sctp_spin_lock_irqsave(&sctp_local_addr_lock, flags); | 3886 | sctp_spin_lock_irqsave(&sctp_local_addr_lock, flags); |
3887 | list_for_each(pos, &sctp_local_addr_list) { | 3887 | list_for_each(pos, &sctp_local_addr_list) { |
3888 | addr = list_entry(pos, | 3888 | addr = list_entry(pos, |
3889 | struct sctp_sockaddr_entry, | 3889 | struct sctp_sockaddr_entry, |
3890 | list); | 3890 | list); |
3891 | if ((PF_INET == sk->sk_family) && | 3891 | if ((PF_INET == sk->sk_family) && |
3892 | (AF_INET6 == addr->a.sa.sa_family)) | 3892 | (AF_INET6 == addr->a_h.sa.sa_family)) |
3893 | continue; | 3893 | continue; |
3894 | cnt++; | 3894 | cnt++; |
3895 | } | 3895 | } |
@@ -3927,9 +3927,9 @@ static int sctp_copy_laddrs_to_user_old(struct sock *sk, __u16 port, int max_add | |||
3927 | list_for_each(pos, &sctp_local_addr_list) { | 3927 | list_for_each(pos, &sctp_local_addr_list) { |
3928 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 3928 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
3929 | if ((PF_INET == sk->sk_family) && | 3929 | if ((PF_INET == sk->sk_family) && |
3930 | (AF_INET6 == addr->a.sa.sa_family)) | 3930 | (AF_INET6 == addr->a_h.sa.sa_family)) |
3931 | continue; | 3931 | continue; |
3932 | memcpy(&temp, &addr->a, sizeof(temp)); | 3932 | memcpy(&temp, &addr->a_h, sizeof(temp)); |
3933 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), | 3933 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), |
3934 | &temp); | 3934 | &temp); |
3935 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; | 3935 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; |
@@ -3962,9 +3962,9 @@ static int sctp_copy_laddrs_to_user(struct sock *sk, __u16 port, | |||
3962 | list_for_each(pos, &sctp_local_addr_list) { | 3962 | list_for_each(pos, &sctp_local_addr_list) { |
3963 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 3963 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
3964 | if ((PF_INET == sk->sk_family) && | 3964 | if ((PF_INET == sk->sk_family) && |
3965 | (AF_INET6 == addr->a.sa.sa_family)) | 3965 | (AF_INET6 == addr->a_h.sa.sa_family)) |
3966 | continue; | 3966 | continue; |
3967 | memcpy(&temp, &addr->a, sizeof(temp)); | 3967 | memcpy(&temp, &addr->a_h, sizeof(temp)); |
3968 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), | 3968 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), |
3969 | &temp); | 3969 | &temp); |
3970 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; | 3970 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; |
@@ -4038,7 +4038,7 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len, | |||
4038 | if (sctp_list_single_entry(&bp->address_list)) { | 4038 | if (sctp_list_single_entry(&bp->address_list)) { |
4039 | addr = list_entry(bp->address_list.next, | 4039 | addr = list_entry(bp->address_list.next, |
4040 | struct sctp_sockaddr_entry, list); | 4040 | struct sctp_sockaddr_entry, list); |
4041 | if (sctp_is_any(&addr->a)) { | 4041 | if (sctp_is_any(&addr->a_h)) { |
4042 | cnt = sctp_copy_laddrs_to_user_old(sk, bp->port, | 4042 | cnt = sctp_copy_laddrs_to_user_old(sk, bp->port, |
4043 | getaddrs.addr_num, | 4043 | getaddrs.addr_num, |
4044 | to); | 4044 | to); |
@@ -4052,7 +4052,7 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len, | |||
4052 | 4052 | ||
4053 | list_for_each(pos, &bp->address_list) { | 4053 | list_for_each(pos, &bp->address_list) { |
4054 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 4054 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
4055 | memcpy(&temp, &addr->a, sizeof(temp)); | 4055 | memcpy(&temp, &addr->a_h, sizeof(temp)); |
4056 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); | 4056 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); |
4057 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; | 4057 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; |
4058 | temp.v4.sin_port = htons(temp.v4.sin_port); | 4058 | temp.v4.sin_port = htons(temp.v4.sin_port); |
@@ -4128,7 +4128,7 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len, | |||
4128 | if (sctp_list_single_entry(&bp->address_list)) { | 4128 | if (sctp_list_single_entry(&bp->address_list)) { |
4129 | addr = list_entry(bp->address_list.next, | 4129 | addr = list_entry(bp->address_list.next, |
4130 | struct sctp_sockaddr_entry, list); | 4130 | struct sctp_sockaddr_entry, list); |
4131 | if (sctp_is_any(&addr->a)) { | 4131 | if (sctp_is_any(&addr->a_h)) { |
4132 | cnt = sctp_copy_laddrs_to_user(sk, bp->port, | 4132 | cnt = sctp_copy_laddrs_to_user(sk, bp->port, |
4133 | &to, space_left); | 4133 | &to, space_left); |
4134 | if (cnt < 0) { | 4134 | if (cnt < 0) { |
@@ -4141,7 +4141,7 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len, | |||
4141 | 4141 | ||
4142 | list_for_each(pos, &bp->address_list) { | 4142 | list_for_each(pos, &bp->address_list) { |
4143 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); | 4143 | addr = list_entry(pos, struct sctp_sockaddr_entry, list); |
4144 | memcpy(&temp, &addr->a, sizeof(temp)); | 4144 | memcpy(&temp, &addr->a_h, sizeof(temp)); |
4145 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); | 4145 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); |
4146 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; | 4146 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; |
4147 | if(space_left < addrlen) | 4147 | if(space_left < addrlen) |
@@ -4195,7 +4195,7 @@ static int sctp_getsockopt_primary_addr(struct sock *sk, int len, | |||
4195 | return -ENOTCONN; | 4195 | return -ENOTCONN; |
4196 | 4196 | ||
4197 | flip_to_n((union sctp_addr *)&prim.ssp_addr, | 4197 | flip_to_n((union sctp_addr *)&prim.ssp_addr, |
4198 | &asoc->peer.primary_path->ipaddr); | 4198 | &asoc->peer.primary_path->ipaddr_h); |
4199 | 4199 | ||
4200 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, | 4200 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, |
4201 | (union sctp_addr *)&prim.ssp_addr); | 4201 | (union sctp_addr *)&prim.ssp_addr); |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 3e5936a5f671..1f56c9d95739 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -61,12 +61,12 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
61 | gfp_t gfp) | 61 | gfp_t gfp) |
62 | { | 62 | { |
63 | /* Copy in the address. */ | 63 | /* Copy in the address. */ |
64 | peer->ipaddr = *addr; | 64 | peer->ipaddr_h = *addr; |
65 | peer->af_specific = sctp_get_af_specific(addr->sa.sa_family); | 65 | peer->af_specific = sctp_get_af_specific(addr->sa.sa_family); |
66 | peer->asoc = NULL; | 66 | peer->asoc = NULL; |
67 | 67 | ||
68 | peer->dst = NULL; | 68 | peer->dst = NULL; |
69 | memset(&peer->saddr, 0, sizeof(union sctp_addr)); | 69 | memset(&peer->saddr_h, 0, sizeof(union sctp_addr)); |
70 | 70 | ||
71 | /* From 6.3.1 RTO Calculation: | 71 | /* From 6.3.1 RTO Calculation: |
72 | * | 72 | * |
@@ -232,7 +232,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport) | |||
232 | { | 232 | { |
233 | struct dst_entry *dst; | 233 | struct dst_entry *dst; |
234 | 234 | ||
235 | dst = transport->af_specific->get_dst(NULL, &transport->ipaddr, NULL); | 235 | dst = transport->af_specific->get_dst(NULL, &transport->ipaddr_h, NULL); |
236 | 236 | ||
237 | if (dst) { | 237 | if (dst) { |
238 | transport->pathmtu = dst_mtu(dst); | 238 | transport->pathmtu = dst_mtu(dst); |
@@ -249,15 +249,15 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
249 | { | 249 | { |
250 | struct sctp_association *asoc = transport->asoc; | 250 | struct sctp_association *asoc = transport->asoc; |
251 | struct sctp_af *af = transport->af_specific; | 251 | struct sctp_af *af = transport->af_specific; |
252 | union sctp_addr *daddr = &transport->ipaddr; | 252 | union sctp_addr *daddr = &transport->ipaddr_h; |
253 | struct dst_entry *dst; | 253 | struct dst_entry *dst; |
254 | 254 | ||
255 | dst = af->get_dst(asoc, daddr, saddr); | 255 | dst = af->get_dst(asoc, daddr, saddr); |
256 | 256 | ||
257 | if (saddr) | 257 | if (saddr) |
258 | memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); | 258 | memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); |
259 | else | 259 | else |
260 | af->get_saddr(asoc, dst, daddr, &transport->saddr); | 260 | af->get_saddr(asoc, dst, daddr, &transport->saddr_h); |
261 | 261 | ||
262 | transport->dst = dst; | 262 | transport->dst = dst; |
263 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { | 263 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { |
@@ -270,7 +270,7 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
270 | * association's active path for getsockname(). | 270 | * association's active path for getsockname(). |
271 | */ | 271 | */ |
272 | if (asoc && (transport == asoc->peer.active_path)) | 272 | if (asoc && (transport == asoc->peer.active_path)) |
273 | opt->pf->af->to_sk_saddr(&transport->saddr, | 273 | opt->pf->af->to_sk_saddr(&transport->saddr_h, |
274 | asoc->base.sk); | 274 | asoc->base.sk); |
275 | } else | 275 | } else |
276 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 276 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |