Skip to content

Commit

Permalink
bgpd: remove timestamp from bmp rib-out monitoring messages
Browse files Browse the repository at this point in the history
rib-out monitoring messages' timestamp must be the timestamp the path has been added to adj-rib-out
this information is not available as of now in FRR so we set the timestamp flag to 0

Signed-off-by: Maxence Younsi <[email protected]>
  • Loading branch information
mxyns committed Nov 21, 2023
1 parent d3f45ee commit e9b64c5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions bgpd/bgp_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* BMP support.
* Copyright (C) 2018 Yasuhiro Ohara
* Copyright (C) 2019 David Lamparter for NetDEF, Inc.
* Copyright (C) 2023 Maxence Younsi
*/

#include <zebra.h>
Expand Down Expand Up @@ -1440,8 +1441,6 @@ struct rib_out_pre_updgrp_walkctx {
static int bmp_monitor_rib_out_pre_updgrp_walkcb(struct update_group *updgrp,
void *hidden_ctx)
{


struct rib_out_pre_updgrp_walkctx *ctx =
(struct rib_out_pre_updgrp_walkctx *)hidden_ctx;

Expand Down Expand Up @@ -1472,7 +1471,7 @@ static int bmp_monitor_rib_out_pre_updgrp_walkcb(struct update_group *updgrp,
bmp_get_peer_type(PAF_PEER(paf)), bgp_dest_get_prefix(ctx->dest),
ctx->prd, ctx->attr, SUBGRP_AFI(subgrp),
SUBGRP_SAFI(subgrp), addpath_tx_id,
monotime(NULL), ctx->bpi);
(time_t)(-1L), ctx->bpi);

*ctx->written_ref = true;
}
Expand Down Expand Up @@ -1555,7 +1554,7 @@ static int bmp_monitor_rib_out_post_updgrp_walkcb(struct update_group *updgrp,
bmp_get_peer_type(PAF_PEER(paf)), ctx->pfx, ctx->prd,
advertised_attr, SUBGRP_AFI(subgrp),
SUBGRP_SAFI(subgrp), addpath_tx_id,
monotime(NULL), ctx->bpi);
(time_t)(-1L), ctx->bpi);

*ctx->written_ref = true;
}
Expand Down Expand Up @@ -2176,7 +2175,7 @@ static bool bmp_wrqueue_ribout(struct bmp *bmp, struct pullwr *pullwr)

bmp_monitor(bmp, peer, BMP_PEER_FLAG_O, bmp_get_peer_type(peer),
&bqe->p, prd, bpi ? bpi->attr : NULL, afi, safi,
addpath_tx_id, monotime(NULL), bpi);
addpath_tx_id, (time_t)(-1L), bpi);

written = true;
}
Expand All @@ -2200,7 +2199,7 @@ static bool bmp_wrqueue_ribout(struct bmp *bmp, struct pullwr *pullwr)
bmp_monitor(bmp, peer, BMP_PEER_FLAG_L | BMP_PEER_FLAG_O,
bmp_get_peer_type(peer), &bqe->p, prd,
advertised_attr, afi, safi, addpath_tx_id,
monotime(NULL), NULL);
(time_t)(-1L), NULL);

written = true;
}
Expand Down

0 comments on commit e9b64c5

Please sign in to comment.