From: Igor Ryzhov Date: Mon, 17 May 2021 22:24:22 +0000 (+0300) Subject: ospf6d: fix "default-information originate" in non-existing vrf X-Git-Tag: base_8.1~528^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F8682%2Fhead;p=mirror%2Ffrr.git 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 --- 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 */