diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-17 09:27:05 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-17 09:27:05 -0600 |
commit | 30f91a677deefaaa2bddd2a1a6864c560d08789b (patch) | |
tree | f541580436c347b341e1dbd54d88b12ff8241ebd /nuttx/net/tcp | |
parent | 348b6cabd50bb2ce02d80f0d6d88ec40ce3ee4af (diff) | |
download | px4-nuttx-30f91a677deefaaa2bddd2a1a6864c560d08789b.tar.gz px4-nuttx-30f91a677deefaaa2bddd2a1a6864c560d08789b.tar.bz2 px4-nuttx-30f91a677deefaaa2bddd2a1a6864c560d08789b.zip |
Networking: Fix accept() so that it returns the correct IP address for the selected socket IP domain.
Diffstat (limited to 'nuttx/net/tcp')
-rw-r--r-- | nuttx/net/tcp/tcp_send_buffered.c | 12 | ||||
-rw-r--r-- | nuttx/net/tcp/tcp_send_unbuffered.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/nuttx/net/tcp/tcp_send_buffered.c b/nuttx/net/tcp/tcp_send_buffered.c index ce71c0e0b..3b53db91b 100644 --- a/nuttx/net/tcp/tcp_send_buffered.c +++ b/nuttx/net/tcp/tcp_send_buffered.c @@ -233,17 +233,17 @@ static inline void send_ipselect(FAR struct net_driver_s *dev, { /* Which domain the the socket support */ - if (psock->domain == PF_INET) + if (psock->s_domain == PF_INET) { /* Select the IPv4 domain */ tcp_ipv4_select(dev); } - else /* if (psock->domain == PF_INET6) */ + else /* if (psock->s_domain == PF_INET6) */ { /* Select the IPv6 domain */ - DEBUGASSERT(psock->domain == PF_INET6); + DEBUGASSERT(psock->s_domain == PF_INET6); tcp_ipv4_select(dev); } } @@ -750,7 +750,7 @@ static inline void send_txnotify(FAR struct socket *psock, * the device driver using the appropriate IP domain. */ - if (psock->domain == PF_INET) + if (psock->s_domain == PF_INET) #endif { /* Notify the device driver that send data is available */ @@ -765,12 +765,12 @@ static inline void send_txnotify(FAR struct socket *psock, #ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv4 - else /* if (psock->domain == PF_INET6) */ + else /* if (psock->s_domain == PF_INET6) */ #endif /* CONFIG_NET_IPv4 */ { /* Notify the device driver that send data is available */ - DEBUGASSERT(psock->domain == PF_INET6); + DEBUGASSERT(psock->s_domain == PF_INET6); #ifdef CONFIG_NET_MULTILINK netdev_ipv6_txnotify(conn->u.ipv6.laddr, conn->u.ipv6.raddr); #else diff --git a/nuttx/net/tcp/tcp_send_unbuffered.c b/nuttx/net/tcp/tcp_send_unbuffered.c index b685838b8..f0156c85b 100644 --- a/nuttx/net/tcp/tcp_send_unbuffered.c +++ b/nuttx/net/tcp/tcp_send_unbuffered.c @@ -180,17 +180,17 @@ static inline void tcpsend_ipselect(FAR struct net_driver_s *dev, /* Which domain the the socket support */ - if (psock->domain == PF_INET) + if (psock->s_domain == PF_INET) { /* Select the IPv4 domain */ tcp_ipv4_select(dev); } - else /* if (psock->domain == PF_INET6) */ + else /* if (psock->s_domain == PF_INET6) */ { /* Select the IPv6 domain */ - DEBUGASSERT(psock->domain == PF_INET6); + DEBUGASSERT(psock->s_domain == PF_INET6); tcp_ipv4_select(dev); } } @@ -533,7 +533,7 @@ static inline void send_txnotify(FAR struct socket *psock, * the device driver using the appropriate IP domain. */ - if (psock->domain == PF_INET) + if (psock->s_domain == PF_INET) #endif { /* Notify the device driver that send data is available */ @@ -548,12 +548,12 @@ static inline void send_txnotify(FAR struct socket *psock, #ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv4 - else /* if (psock->domain == PF_INET6) */ + else /* if (psock->s_domain == PF_INET6) */ #endif /* CONFIG_NET_IPv4 */ { /* Notify the device driver that send data is available */ - DEBUGASSERT(psock->domain == PF_INET6); + DEBUGASSERT(psock->s_domain == PF_INET6); #ifdef CONFIG_NET_MULTILINK netdev_ipv6_txnotify(conn->u.ipv6.laddr, conn->u.ipv6.raddr); #else |