Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions common/src/nx_tcp_packet_send_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ ULONG window_size;
/* Setup the IP pointer. */
ip_ptr = socket_ptr -> nx_tcp_socket_ip_ptr;

#ifdef FEATURE_NX_IPV6
/* An IPv6 connection cannot send while its source address is not valid: deleted,
or IPv6 disabled, until an address is set in that entry again. A deleted entry is
detached from its interface, which _nx_ipv6_packet_send asserts never happens.
The data path refuses in the same case; a control segment is dropped, as one
lost on the link would be. */
if ((socket_ptr -> nx_tcp_socket_connect_ip.nxd_ip_version == NX_IP_VERSION_V6) &&
(socket_ptr -> nx_tcp_socket_ipv6_addr -> nxd_ipv6_address_state != NX_IPV6_ADDR_STATE_VALID))
{
return;
}
#endif /* FEATURE_NX_IPV6 */

if (control_bits & NX_TCP_SYN_BIT)
{

Expand Down
13 changes: 13 additions & 0 deletions common/src/nx_tcp_socket_retransmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ ULONG window_size;
socket_ptr -> nx_tcp_socket_timeout = socket_ptr -> nx_tcp_socket_timeout_rate <<
(socket_ptr -> nx_tcp_socket_timeout_retries * socket_ptr -> nx_tcp_socket_timeout_shift);

#ifdef FEATURE_NX_IPV6
/* An IPv6 connection cannot send while its source address is not valid: deleted,
or IPv6 disabled, until an address is set in that entry again. A deleted entry is
detached from its interface, which _nx_ipv6_packet_send asserts never happens.
The data path refuses in the same case. Leave the packets queued, as for an
unanswered retransmission; the retry count above still limits how long. */
if ((socket_ptr -> nx_tcp_socket_connect_ip.nxd_ip_version == NX_IP_VERSION_V6) &&
(socket_ptr -> nx_tcp_socket_ipv6_addr -> nxd_ipv6_address_state != NX_IPV6_ADDR_STATE_VALID))
{
return;
}
#endif /* FEATURE_NX_IPV6 */

/* Get available size of packet that can be sent. */
available = socket_ptr -> nx_tcp_socket_tx_window_congestion;

Expand Down
2 changes: 2 additions & 0 deletions test/cmake/netxduo/regression/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ set(netxduo_test_cases
${SOURCE_DIR}/netxduo_test/netx_igmp_basic_test.c
${SOURCE_DIR}/netxduo_test/netx_14_19_test.c
${SOURCE_DIR}/netxduo_test/netx_ipv6_address_delete_test.c
${SOURCE_DIR}/netxduo_test/netx_ipv6_address_delete_tcp_test.c
${SOURCE_DIR}/netxduo_test/netx_2_20_test.c
${SOURCE_DIR}/netxduo_test/netx_arp_no_duplicate_entry_test.c
${SOURCE_DIR}/netxduo_test/netx_ip_raw_loopback_test.c
Expand Down Expand Up @@ -361,6 +362,7 @@ set(netxduo_test_cases
${SOURCE_DIR}/netxduo_test/netx_ip_nxe_api_test.c
${SOURCE_DIR}/netxduo_test/netx_tcp_socket_listen_test.c
${SOURCE_DIR}/netxduo_test/netx_ipv6_disable_test.c
${SOURCE_DIR}/netxduo_test/netx_ipv6_disable_tcp_test.c
${SOURCE_DIR}/netxduo_test/netx_icmp_multiple_ping6_test1.c
${SOURCE_DIR}/netxduo_test/netx_ip_address_get_test.c
${SOURCE_DIR}/netxduo_test/netx_10_24_02_test.c
Expand Down
Loading
Loading