Skip to content

Commit e821dd8

Browse files
theasianpianistqiluo-msft
authored andcommitted
[arp_update]: Set failed IPv6 neighbors to incomplete (#11919)
After pinging any failed IPv6 neighbor entries, set the remaining failed/incomplete entries to a permanent INCOMPLETE state. This manual setting to INCOMPLETE prevents these entries from automatically transitioning to FAILED state, and since they are now incomplete any subsequent NA messages for these neighbors is able to resolve the entry in the cache. Signed-off-by: Lawrence Lee <[email protected]>
1 parent f4e5059 commit e821dd8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

files/scripts/arp_update

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ while /bin/true; do
5050
eval `eval $ip6cmd`
5151

5252
if [[ $SUBTYPE == "dualtor" ]]; then
53+
# manually set any remaining FAILED/INCOMPLETE entries to permanently INCOMPLETE
54+
# this prevents any remaining INCOMPLETE entries from automatically transitioning to FAILED
55+
# once these entries are incomplete, any subsequent neighbor advertisement messages
56+
# are able to resolve the entry
57+
58+
# generates the following command for each failed or incomplete IPv6 neighbor
59+
# ip neigh replace <neighbor IPv6> dev <VLAN name> nud incomplete
60+
neigh_replace_template="sed -e 's/^/ip neigh replace /' -e 's/,/ dev /' -e 's/$/ nud incomplete;/'"
61+
ip_neigh_replace_cmd="ip -6 neigh show | grep -v fe80 | grep Vlan1000 | grep -E 'FAILED|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',' | $neigh_replace_template"
62+
eval `eval $ip_neigh_replace_cmd`
63+
5364
# on dual ToR devices, try to resolve failed neighbor entries since
5465
# these entries will have tunnel routes installed, preventing normal
5566
# neighbor resolution (SWSS PR #2137)

0 commit comments

Comments
 (0)