summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuxinzhou <[email protected]>2025-12-07 14:36:23 -0800
committeryuxinzhou <[email protected]>2025-12-07 14:36:23 -0800
commit77a63c7ab198c0ba75397dda26d67b411ae109fd (patch)
tree1ba8e754266cd8f3a6b6e67e6314f6f138b49e64
parent5af33d7d55e67dc93ddff52ec6eb74674c69cbb7 (diff)
in processing PACKET_TOO_BIG, send ND request if a new ND entry is created.
-rw-r--r--common/src/nx_icmpv6_process_packet_too_big.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/common/src/nx_icmpv6_process_packet_too_big.c b/common/src/nx_icmpv6_process_packet_too_big.c
index 53294b16..a7adb947 100644
--- a/common/src/nx_icmpv6_process_packet_too_big.c
+++ b/common/src/nx_icmpv6_process_packet_too_big.c
@@ -164,6 +164,20 @@ NX_INTERFACE *if_ptr;
status = _nx_icmpv6_dest_table_add(ip_ptr, original_destination_ip,
&dest_entry_ptr, &default_next_hop_address[0], mtu, 0,
packet_ptr -> nx_packet_address.nx_packet_ipv6_address_ptr);
+
+ /* If a new ND cache is created, force the entry to be "INCOMPLETE" so that the timer logic will
+ re-try, and then timeout if no responses are received. */
+ if(dest_entry_ptr -> nx_ipv6_destination_entry_nd_entry != NX_NULL)
+ {
+ ND_CACHE_ENTRY *nd_entry = dest_entry_ptr -> nx_ipv6_destination_entry_nd_entry;
+ if(nd_entry -> nx_nd_cache_nd_status == ND_CACHE_STATE_CREATED)
+ {
+ _nx_icmpv6_send_ns(ip_ptr, &nd_entry -> nx_nd_cache_dest_ip[0], 1,
+ nd_entry -> nx_nd_cache_outgoing_address, 0, nd_entry);
+ nd_entry->nx_nd_cache_num_solicit = NX_MAX_MULTICAST_SOLICIT - 1;
+ nd_entry->nx_nd_cache_timer_tick = ip_ptr -> nx_ipv6_retrans_timer_ticks;
+ }
+ }
}
/* Release the packet. */