summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bmp.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-12-01 07:12:33 +0100
committerGitHub <noreply@github.com>2021-12-01 07:12:33 +0100
commite2144103f81c5bd46f734bc94e1dbc0aebb66f6e (patch)
treeb7a657150a5c54a2a196476047bb90d3d5ec5c41 /bgpd/bgp_bmp.c
parentMerge pull request #9610 from iqras23/best_path (diff)
parentlib: resolver per vrf support (diff)
downloadfrr-e2144103f81c5bd46f734bc94e1dbc0aebb66f6e.tar.xz
frr-e2144103f81c5bd46f734bc94e1dbc0aebb66f6e.zip
Merge pull request #9878 from pguibert6WIND/resolver_vrf
lib: resolver per vrf support
Diffstat (limited to 'bgpd/bgp_bmp.c')
-rw-r--r--bgpd/bgp_bmp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 9f27399f5..746f067ae 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1833,6 +1833,7 @@ static int bmp_active_thread(struct thread *t)
socklen_t slen;
int status, ret;
char buf[SU_ADDRSTRLEN];
+ vrf_id_t vrf_id;
/* all 3 end up here, though only timer or read+write are active
* at a time */
@@ -1843,7 +1844,12 @@ static int bmp_active_thread(struct thread *t)
ba->last_err = NULL;
if (ba->socket == -1) {
- resolver_resolve(&ba->resq, AF_UNSPEC, ba->hostname,
+ /* get vrf_id */
+ if (!ba->targets || !ba->targets->bgp)
+ vrf_id = VRF_DEFAULT;
+ else
+ vrf_id = ba->targets->bgp->vrf_id;
+ resolver_resolve(&ba->resq, AF_UNSPEC, vrf_id, ba->hostname,
bmp_active_resolved);
return 0;
}