mirror of
				https://git.proxmox.com/git/mirror_frr
				synced 2025-11-04 03:13:44 +00:00 
			
		
		
		
	bgpd: Fix ADJCHANGE message to include more info
When bgp logs ADJCHANGE messages include the hostname and vrf that this change is being made in. Ticket: CM-10922 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
		
							parent
							
								
									c358f112a6
								
							
						
					
					
						commit
						c22767d89e
					
				@ -1021,8 +1021,14 @@ bgp_stop (struct peer *peer)
 | 
			
		||||
 | 
			
		||||
      /* bgp log-neighbor-changes of neighbor Down */
 | 
			
		||||
      if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES))
 | 
			
		||||
	zlog_info ("%%ADJCHANGE: neighbor %s Down %s", peer->host,
 | 
			
		||||
                   peer_down_str [(int) peer->last_reset]);
 | 
			
		||||
	{
 | 
			
		||||
	  struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id);
 | 
			
		||||
	  zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Down %s",
 | 
			
		||||
		     peer->host,
 | 
			
		||||
		     (peer->hostname) ? peer->hostname : "Unknown",
 | 
			
		||||
		     (vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default",
 | 
			
		||||
		     peer_down_str [(int) peer->last_reset]);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      /* graceful restart */
 | 
			
		||||
      if (peer->t_gr_stale)
 | 
			
		||||
@ -1459,8 +1465,13 @@ bgp_establish (struct peer *peer)
 | 
			
		||||
 | 
			
		||||
  /* bgp log-neighbor-changes of neighbor Up */
 | 
			
		||||
  if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES))
 | 
			
		||||
    zlog_info ("%%ADJCHANGE: neighbor %s Up", peer->host);
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
      struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id);
 | 
			
		||||
      zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Up",
 | 
			
		||||
		 peer->host,
 | 
			
		||||
		 (peer->hostname) ? peer->hostname : "Unknown",
 | 
			
		||||
		 (vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default");
 | 
			
		||||
    }
 | 
			
		||||
  /* assign update-group/subgroup */
 | 
			
		||||
  update_group_adjust_peer_afs(peer);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user