]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix checking of clients subscribed to receive default routes
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 18 Jan 2019 18:06:00 +0000 (16:06 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 18 Jan 2019 18:06:00 +0000 (16:06 -0200)
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>
lib/zclient.c

index cc936d47d773ce6fd442d543eb76c205bf20184d..367a21f7d0a841a9c7729dcc0a50505fdfd286d3 100644 (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);