]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: fix "default-information originate" in non-existing vrf 8682/head
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 17 May 2021 22:24:22 +0000 (01:24 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 17 May 2021 22:24:22 +0000 (01:24 +0300)
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 <iryzhov@nfware.com>
ospf6d/ospf6_top.c

index a5c188c465af487099047a77a4fcebbe72e328ea..2376409ccd907a80cc337aa03fb1016456ecfd6e 100644 (file)
@@ -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 */