summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_ptm_redistribute.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-18 19:06:00 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 19:06:00 +0100
commitf20b478ef3d25e153939516a473bb2e80603cbd5 (patch)
tree019f3bea176957a24c315d658f7a612137ede054 /zebra/zebra_ptm_redistribute.c
parentMerge pull request #3625 from donaldsharp/clist_strlen (diff)
downloadfrr-f20b478ef3d25e153939516a473bb2e80603cbd5.tar.xz
frr-f20b478ef3d25e153939516a473bb2e80603cbd5.zip
zebra: fix checking of clients subscribed to receive interface info
client->ifinfo is a VRF bitmap, hence we need to use vrf_bitmap_check() to check if a client is subscribed to receive interface information for a particular VRF. Just checking if the client->ifinfo value is set will always succeed since it's a pointer initialized by zserv_client_create(). With this fix, we'll stop sending interface messages from all VRFs to all clients, even those that didn't subscribe to it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_ptm_redistribute.c')
-rw-r--r--zebra/zebra_ptm_redistribute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_ptm_redistribute.c b/zebra/zebra_ptm_redistribute.c
index 420105198..3acbe3bf2 100644
--- a/zebra/zebra_ptm_redistribute.c
+++ b/zebra/zebra_ptm_redistribute.c
@@ -37,7 +37,7 @@ static int zsend_interface_bfd_update(int cmd, struct zserv *client,
struct stream *s;
/* Check this client need interface information. */
- if (!client->ifinfo)
+ if (!vrf_bitmap_check(client->ifinfo, ifp->vrf_id))
return 0;
s = stream_new(ZEBRA_MAX_PACKET_SIZ);