summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_zebra.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-11 19:20:13 -0200
committerRenato Westphal <renato@opensourcerouting.org>2019-01-14 11:41:33 -0200
commit49db7a7b055d69a8d3892a9171912b8b0f00aa45 (patch)
treecf173e30c23a4a5b682b3c15242e31615a540ec8 /ospf6d/ospf6_zebra.c
parentca88bbed50dfb3390e54791765794f626afcaf4b (diff)
lib, zebra: add AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_* messages
Some daemons like ospfd and isisd have the ability to advertise a default route to their peers only if one exists in the RIB. This is what the "default-information originate" commands do when used without the "always" parameter. For that to work, these daemons use the ZEBRA_REDISTRIBUTE_DEFAULT_ADD message to request default route information to zebra. The problem is that this message didn't have an AFI parameter, so a default route from any address-family would satisfy the requests from both daemons (e.g. ::/0 would trigger ospfd to advertise a default route to its peers, and 0.0.0.0/0 would trigger isisd to advertise a default route to its IPv6 peers). Fix this by adding an AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_{ADD,DELETE} messages and making the corresponding code changes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_zebra.c')
-rw-r--r--ospf6d/ospf6_zebra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 5db9b529ef..54f1735e7a 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -269,7 +269,8 @@ DEFUN (show_zebra,
vty_out(vty, "Zebra Infomation\n");
vty_out(vty, " fail: %d\n", zclient->fail);
vty_out(vty, " redistribute default: %d\n",
- vrf_bitmap_check(zclient->default_information, VRF_DEFAULT));
+ vrf_bitmap_check(zclient->default_information[AFI_IP6],
+ VRF_DEFAULT));
vty_out(vty, " redistribute:");
for (i = 0; i < ZEBRA_ROUTE_MAX; i++) {
if (vrf_bitmap_check(zclient->redist[AFI_IP6][i], VRF_DEFAULT))