lib: fix checking of clients subscribed to receive default routes

In these two functions, we were using VRF_DEFAULT instead of the
VRF ID passed as a parameter when checking if the given client
subscribed to receive default routes or not. This prevented the
"default-originate" command from ospfd/isisd from working correctly
under specific circumstances.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2019-01-18 16:06:00 -02:00
parent f20b478ef3
commit d763789879

View File

@ -457,8 +457,7 @@ void zclient_send_reg_requests(struct zclient *zclient, vrf_id_t vrf_id)
vrf_id);
/* If default information is needed. */
if (vrf_bitmap_check(zclient->default_information[afi],
VRF_DEFAULT))
if (vrf_bitmap_check(zclient->default_information[afi], vrf_id))
zebra_redistribute_default_send(
ZEBRA_REDISTRIBUTE_DEFAULT_ADD, zclient, afi,
vrf_id);
@ -525,8 +524,7 @@ void zclient_send_dereg_requests(struct zclient *zclient, vrf_id_t vrf_id)
i, 0, vrf_id);
/* If default information is needed. */
if (vrf_bitmap_check(zclient->default_information[afi],
VRF_DEFAULT))
if (vrf_bitmap_check(zclient->default_information[afi], vrf_id))
zebra_redistribute_default_send(
ZEBRA_REDISTRIBUTE_DEFAULT_DELETE, zclient, afi,
vrf_id);