Skip to content

Commit

Permalink
[chassis-packet] fix the issue of internal ip arp not getting resolve…
Browse files Browse the repository at this point in the history
…d. (#12127)

Fix the issue where arp_update will not ping some of the ip's even
though they are in failed state since grep of that ip on ip neigh show
command does not do exact word match and can return multiple match.
  • Loading branch information
abdosi authored and yxieca committed Nov 28, 2022
1 parent a51264d commit 88bb83e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/scripts/arp_update
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ while /bin/true; do
fi
for nexthop in $STATIC_ROUTE_NEXTHOPS; do
if [[ $nexthop == *"."* ]]; then
neigh_state=( $(ip -4 neigh show | grep $nexthop | tr -s ' ' | cut -d ' ' -f 3,4) )
neigh_state=( $(ip -4 neigh show | grep -w $nexthop | tr -s ' ' | cut -d ' ' -f 3,4) )
ping_prefix=ping
elif [[ $nexthop == *":"* ]] ; then
neigh_state=( $(ip -6 neigh show | grep $nexthop | tr -s ' ' | cut -d ' ' -f 3,4) )
neigh_state=( $(ip -6 neigh show | grep -w $nexthop | tr -s ' ' | cut -d ' ' -f 3,4) )
ping_prefix=ping6
fi

Expand Down

0 comments on commit 88bb83e

Please sign in to comment.