aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:22:43 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:27:01 -0500
commitb3f5b3b6654422bb0a6ef745fe4d11a4f01d006a (patch)
tree258b35b5b3eb721db94872f1a86806175b0a5ef4 /net
parent74af924ab6562717ef9aab1061ec05bbbf31d979 (diff)
[SCTP]: Trivial ->ipaddr_h -> ->ipaddr conversions.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/associola.c14
-rw-r--r--net/sctp/ipv6.c2
-rw-r--r--net/sctp/sm_sideeffect.c4
-rw-r--r--net/sctp/socket.c6
4 files changed, 12 insertions, 14 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 5b8971be9775..fa7cda4b1813 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -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_h), 490 (&peer->ipaddr),
491 peer->ipaddr_h.v4.sin_port); 491 ntohs(peer->ipaddr.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.
@@ -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_h), 1139 (&t->ipaddr),
1140 t->ipaddr_h.v4.sin_port); 1140 ntohs(t->ipaddr.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_h), 1164 (&t->ipaddr),
1165 t->ipaddr_h.v4.sin_port); 1165 ntohs(t->ipaddr.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_h); 1310 scope = sctp_scope(&asoc->peer.active_path->ipaddr);
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/ipv6.c b/net/sctp/ipv6.c
index 04d5e13e9183..a76ffc143894 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -161,7 +161,7 @@ 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_h.v6.sin6_addr); 164 ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr.v6.sin6_addr);
165 ipv6_addr_copy(&fl.fl6_src, &transport->saddr.v6.sin6_addr); 165 ipv6_addr_copy(&fl.fl6_src, &transport->saddr.v6.sin6_addr);
166 166
167 fl.fl6_flowlabel = np->flow_label; 167 fl.fl6_flowlabel = np->flow_label;
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index a11bd4ff9303..c512ce491834 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_h), 444 (&transport->ipaddr),
445 transport->ipaddr_h.v4.sin_port); 445 ntohs(transport->ipaddr.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);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d049b2ce5cf2..e527267a0536 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3752,10 +3752,9 @@ static int sctp_getsockopt_peer_addrs_old(struct sock *sk, int len,
3752 to = (void __user *)getaddrs.addrs; 3752 to = (void __user *)getaddrs.addrs;
3753 list_for_each(pos, &asoc->peer.transport_addr_list) { 3753 list_for_each(pos, &asoc->peer.transport_addr_list) {
3754 from = list_entry(pos, struct sctp_transport, transports); 3754 from = list_entry(pos, struct sctp_transport, transports);
3755 memcpy(&temp, &from->ipaddr_h, sizeof(temp)); 3755 memcpy(&temp, &from->ipaddr, sizeof(temp));
3756 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); 3756 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp);
3757 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; 3757 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len;
3758 temp.v4.sin_port = htons(temp.v4.sin_port);
3759 if (copy_to_user(to, &temp, addrlen)) 3758 if (copy_to_user(to, &temp, addrlen))
3760 return -EFAULT; 3759 return -EFAULT;
3761 to += addrlen ; 3760 to += addrlen ;
@@ -3801,12 +3800,11 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
3801 3800
3802 list_for_each(pos, &asoc->peer.transport_addr_list) { 3801 list_for_each(pos, &asoc->peer.transport_addr_list) {
3803 from = list_entry(pos, struct sctp_transport, transports); 3802 from = list_entry(pos, struct sctp_transport, transports);
3804 memcpy(&temp, &from->ipaddr_h, sizeof(temp)); 3803 memcpy(&temp, &from->ipaddr, sizeof(temp));
3805 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); 3804 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp);
3806 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; 3805 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len;
3807 if(space_left < addrlen) 3806 if(space_left < addrlen)
3808 return -ENOMEM; 3807 return -ENOMEM;
3809 temp.v4.sin_port = htons(temp.v4.sin_port);
3810 if (copy_to_user(to, &temp, addrlen)) 3808 if (copy_to_user(to, &temp, addrlen))
3811 return -EFAULT; 3809 return -EFAULT;
3812 to += addrlen; 3810 to += addrlen;