Skip to content

Commit 05a85b5

Browse files
authored
[arp_update] Resolve neighbors from config_db (#15006)
* To resolve NEIGH table entries present in CONFIG_DB. Without this change arp/ndp entries which we wish to resolve, and configured via CONFIG_DB are not resolved.
1 parent 7afeffc commit 05a85b5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

files/scripts/arp_update

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ while /bin/true; do
124124

125125
# refresh neighbor entries from APP_DB in case of mismatch with kernel
126126
DBNEIGH=$(sonic-db-cli APPL_DB keys NEIGH_TABLE*)
127-
KERNEIGH4=$(ip -4 neigh show | grep Vlan | cut -d ' ' -f 1,3 --output-delimiter=',')
128-
KERNEIGH6=$(ip -6 neigh show | grep -v fe80 | grep Vlan | cut -d ' ' -f 1,3 --output-delimiter=',')
127+
128+
# resolve neighbor entries from CONFIG_DB in case of mismatch with kernel
129+
DBNEIGH="$DBNEIGH $(sonic-db-cli CONFIG_DB keys NEIGH* | sed -e 's/|/:/g')"
130+
131+
KERNEIGH4=$(ip -4 neigh show | grep Vlan | grep -v 'FAILED\|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',')
132+
KERNEIGH6=$(ip -6 neigh show | grep -v fe80 | grep Vlan | grep -v 'FAILED\|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',')
129133
for neigh in $DBNEIGH; do
130134
intf="$( cut -d ':' -f 2 <<< "$neigh" )"
131135
ip="$( cut -d ':' -f 3- <<< "$neigh" )"

0 commit comments

Comments
 (0)