network: Correct some issues that prevent TCP from working correctly when both IPv4 and IPv6 are enabled.

This commit is contained in:
Gregory Nutt 2017-07-07 08:50:01 -06:00
parent b4a0ac53a8
commit 8d81b35c44
4 changed files with 4 additions and 3 deletions

View File

@ -255,6 +255,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
set_errno(-ret);
ret = ERROR;
}
return ret;
}

View File

@ -285,7 +285,7 @@ static void tcp_input(FAR struct net_driver_s *dev, uint8_t domain,
}
}
nwarn("WARNING: Old packet .. reset\n");
nwarn("WARNING: SYN with no listener (or old packet) .. reset\n");
/* This is (1) an old duplicate packet or (2) a SYN packet but with
* no matching listener found. Send RST packet in either case.

View File

@ -243,7 +243,7 @@ static inline void send_ipselect(FAR struct net_driver_s *dev,
/* Select the IPv6 domain */
DEBUGASSERT(conn->domain == PF_INET6);
tcp_ipv4_select(dev);
tcp_ipv6_select(dev);
}
}
#endif

View File

@ -194,7 +194,7 @@ static inline void tcpsend_ipselect(FAR struct net_driver_s *dev,
/* Select the IPv6 domain */
DEBUGASSERT(conn->domain == PF_INET6);
tcp_ipv4_select(dev);
tcp_ipv6_select(dev);
}
}
#endif