diff options
| -rw-r--r-- | bgpd/bgpd.c | 6 | ||||
| -rw-r--r-- | bgpd/bgpd.h | 2 | 
2 files changed, 6 insertions, 2 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 8229bcb437..5a513594ca 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1140,8 +1140,10 @@ static void bgp_peer_connection_free(struct peer_connection *connection)  	pthread_mutex_destroy(&connection->io_mtx);  } -static void bgp_peer_connection_new(struct peer_connection *connection) +static void bgp_peer_connection_new(struct peer *peer, +				    struct peer_connection *connection)  { +	connection->peer = peer;  	connection->fd = -1;  	connection->ibuf = stream_fifo_new(); @@ -1464,7 +1466,7 @@ struct peer *peer_new(struct bgp *bgp)  	bgp_peer_gr_init(peer);  	/* Create buffers.  */ -	bgp_peer_connection_new(&peer->connection); +	bgp_peer_connection_new(peer, &peer->connection);  	/* Get service port number.  */  	sp = getservbyname("bgp", "tcp"); diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 7855d1d765..bd67c2f917 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -1121,6 +1121,8 @@ struct llgr_info {  };  struct peer_connection { +	struct peer *peer; +  	int fd;  	/* Packet receive and send buffer. */  | 
