diff options
Diffstat (limited to 'bgpd/rfapi/rfapi.c')
| -rw-r--r-- | bgpd/rfapi/rfapi.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 985094d323..ff7137bdd9 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -1236,26 +1236,9 @@ static int rfapi_open_inner(struct rfapi_descriptor *rfd, struct bgp *bgp, * Fill in BGP peer structure */ rfd->peer = peer_new(bgp); - rfd->peer->status = Established; /* keep bgp core happy */ + rfd->peer->connection->status = Established; /* keep bgp core happy */ - /* - * since this peer is not on the I/O thread, this lock is not strictly - * necessary, but serves as a reminder to those who may meddle... - */ - frr_with_mutex (&rfd->peer->io_mtx) { - // we don't need any I/O related facilities - if (rfd->peer->ibuf) - stream_fifo_free(rfd->peer->ibuf); - if (rfd->peer->obuf) - stream_fifo_free(rfd->peer->obuf); - - if (rfd->peer->ibuf_work) - ringbuf_del(rfd->peer->ibuf_work); - - rfd->peer->ibuf = NULL; - rfd->peer->obuf = NULL; - rfd->peer->ibuf_work = NULL; - } + bgp_peer_connection_buffers_free(rfd->peer->connection); { /* base code assumes have valid host pointer */ char buf[INET6_ADDRSTRLEN]; |
