mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-11-03 19:47:56 +00:00 
			
		
		
		
	[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.
This commit is contained in:
		@@ -124,8 +124,12 @@ while /bin/true; do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # refresh neighbor entries from APP_DB in case of mismatch with kernel
 | 
					  # refresh neighbor entries from APP_DB in case of mismatch with kernel
 | 
				
			||||||
  DBNEIGH=$(sonic-db-cli APPL_DB keys NEIGH_TABLE*)
 | 
					  DBNEIGH=$(sonic-db-cli APPL_DB keys NEIGH_TABLE*)
 | 
				
			||||||
  KERNEIGH4=$(ip -4 neigh show | grep Vlan | cut -d ' ' -f 1,3  --output-delimiter=',')
 | 
					
 | 
				
			||||||
  KERNEIGH6=$(ip -6 neigh show | grep -v fe80 | grep Vlan | cut -d ' ' -f 1,3  --output-delimiter=',')
 | 
					  # resolve neighbor entries from CONFIG_DB in case of mismatch with kernel
 | 
				
			||||||
 | 
					  DBNEIGH="$DBNEIGH $(sonic-db-cli CONFIG_DB keys NEIGH* | sed -e 's/|/:/g')"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  KERNEIGH4=$(ip -4 neigh show | grep Vlan | grep -v 'FAILED\|INCOMPLETE' | cut -d ' ' -f 1,3  --output-delimiter=',')
 | 
				
			||||||
 | 
					  KERNEIGH6=$(ip -6 neigh show | grep -v fe80 | grep Vlan | grep -v 'FAILED\|INCOMPLETE' | cut -d ' ' -f 1,3  --output-delimiter=',')
 | 
				
			||||||
  for neigh in $DBNEIGH; do
 | 
					  for neigh in $DBNEIGH; do
 | 
				
			||||||
      intf="$( cut -d ':' -f 2 <<< "$neigh" )"
 | 
					      intf="$( cut -d ':' -f 2 <<< "$neigh" )"
 | 
				
			||||||
      ip="$( cut -d ':' -f 3- <<< "$neigh" )"
 | 
					      ip="$( cut -d ':' -f 3- <<< "$neigh" )"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user