]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: fix "default-information originate" in non-existing vrf
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 17 May 2021 22:23:35 +0000 (01:23 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 17 May 2021 22:23:35 +0000 (01:23 +0300)
If the default route redistribution is configured in OSPF 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>
ospfd/ospfd.c

index cc1404e5e9f7485f6d617e67915a243624edd980..7505f24aeff78cf4c598343ec963212798905365 100644 (file)
@@ -2182,6 +2182,16 @@ static void ospf_set_redist_vrf_bitmaps(struct ospf *ospf, bool set)
                        vrf_bitmap_unset(zclient->redist[AFI_IP][type],
                                         ospf->vrf_id);
        }
+
+       red_list = ospf->redist[DEFAULT_ROUTE];
+       if (red_list) {
+               if (set)
+                       vrf_bitmap_set(zclient->default_information[AFI_IP],
+                                      ospf->vrf_id);
+               else
+                       vrf_bitmap_unset(zclient->default_information[AFI_IP],
+                                        ospf->vrf_id);
+       }
 }
 
 /* Enable OSPF VRF instance */