Correct calculation of initial MSS
This commit is contained in:
parent
eac4ea7ae5
commit
1c8dae4eee
@ -255,8 +255,26 @@ static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev,
|
||||
*/
|
||||
|
||||
DEBUGASSERT(pstate->tc_conn);
|
||||
pstate->tc_conn->mss = TCP_IPv4_INITIAL_MSS(dev);
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
if (pstate->tc_conn->domain == PF_INET)
|
||||
#endif
|
||||
{
|
||||
pstate->tc_conn->mss = TCP_IPv4_INITIAL_MSS(dev);
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
else
|
||||
#endif
|
||||
{
|
||||
pstate->tc_conn->mss = TCP_IPv4_INITIAL_MSS(dev);
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
#endif /* CONFIG_NET_MULTILINK */
|
||||
|
||||
/* Wake up the waiting thread */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user