mirror of
https://github.com/apache/nuttx.git
synced 2025-12-19 19:08:23 +08:00
network: Correct some issues that prevent TCP from working correctly when both IPv4 and IPv6 are enabled.
This commit is contained in:
@@ -255,6 +255,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
|
|||||||
set_errno(-ret);
|
set_errno(-ret);
|
||||||
ret = ERROR;
|
ret = ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
/* This is (1) an old duplicate packet or (2) a SYN packet but with
|
||||||
* no matching listener found. Send RST packet in either case.
|
* no matching listener found. Send RST packet in either case.
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ static inline void send_ipselect(FAR struct net_driver_s *dev,
|
|||||||
/* Select the IPv6 domain */
|
/* Select the IPv6 domain */
|
||||||
|
|
||||||
DEBUGASSERT(conn->domain == PF_INET6);
|
DEBUGASSERT(conn->domain == PF_INET6);
|
||||||
tcp_ipv4_select(dev);
|
tcp_ipv6_select(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ static inline void tcpsend_ipselect(FAR struct net_driver_s *dev,
|
|||||||
/* Select the IPv6 domain */
|
/* Select the IPv6 domain */
|
||||||
|
|
||||||
DEBUGASSERT(conn->domain == PF_INET6);
|
DEBUGASSERT(conn->domain == PF_INET6);
|
||||||
tcp_ipv4_select(dev);
|
tcp_ipv6_select(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user