summaryrefslogtreecommitdiff
path: root/nuttx/net/tcp
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-20 18:14:09 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-20 18:14:09 -0600
commit76a7272bad960a5d5abb6ec09a1aebc1e5fad1a5 (patch)
treeeaaa435435196e67cd8bcdc0332530f8966094e9 /nuttx/net/tcp
parent85b02aa80df6d162d17f3eaef4290c7e92a655e0 (diff)
downloadpx4-nuttx-76a7272bad960a5d5abb6ec09a1aebc1e5fad1a5.tar.gz
px4-nuttx-76a7272bad960a5d5abb6ec09a1aebc1e5fad1a5.tar.bz2
px4-nuttx-76a7272bad960a5d5abb6ec09a1aebc1e5fad1a5.zip
Correct name of fields in struct sockaddr_in6: sin6_port and sin6_family, not sin_port and sin_family
Diffstat (limited to 'nuttx/net/tcp')
-rw-r--r--nuttx/net/tcp/tcp_conn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/net/tcp/tcp_conn.c b/nuttx/net/tcp/tcp_conn.c
index 4c531dfa1..32a5b7e25 100644
--- a/nuttx/net/tcp/tcp_conn.c
+++ b/nuttx/net/tcp/tcp_conn.c
@@ -577,9 +577,9 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn,
#ifdef CONFIG_NETDEV_MULTINIC
port = tcp_selectport(PF_INET6,
(FAR const union ip_addr_u ipaddr *)addr->sin6_addr.in6_u.u6_addr16,
- ntohs(addr->sin_port));
+ ntohs(addr->sin6_port));
#else
- port = tcp_selectport(ntohs(addr->sin_port));
+ port = tcp_selectport(ntohs(addr->sin6_port));
#endif
net_unlock(flags);
@@ -591,7 +591,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn,
/* Save the local address in the connection structure. */
- conn->lport = addr->sin_port;
+ conn->lport = addr->sin6_port;
#ifdef CONFIG_NETDEV_MULTINIC
net_ipv6addr_copy(conn->u.ipv6.laddr, addr->sin6_addr.in6_u.u6_addr16);
@@ -1165,7 +1165,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr)
/* Save MSS and the port from the sockaddr (already in network order) */
conn->mss = MIN_IPv6_TCP_INITIAL_MSS;
- conn->rport = inaddr->sin_port;
+ conn->rport = inaddr->sin6_port;
/* The sockaddr address is 32-bits in network order. */