From 82bc4b8a96e898eddcee637f8a7ac81cdf3ced9f Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 18 May 2021 01:24:22 +0300 Subject: [PATCH] ospf6d: fix "default-information originate" in non-existing vrf If the default route redistribution is configured in OSPF6 router before the VRF is created, then this is not currently registered in zebra after the VRF creation. Signed-off-by: Igor Ryzhov --- ospf6d/ospf6_top.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index a5c188c465..2376409ccd 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -156,6 +156,16 @@ static void ospf6_set_redist_vrf_bitmaps(struct ospf6 *ospf6, bool set) vrf_bitmap_unset(zclient->redist[AFI_IP6][type], ospf6->vrf_id); } + + red_list = ospf6->redist[DEFAULT_ROUTE]; + if (red_list) { + if (set) + vrf_bitmap_set(zclient->default_information[AFI_IP6], + ospf6->vrf_id); + else + vrf_bitmap_unset(zclient->default_information[AFI_IP6], + ospf6->vrf_id); + } } /* Disable OSPF6 VRF instance */ -- 2.39.5