summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-05-18 00:23:35 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-05-18 00:23:35 +0200
commitb46538c4a3dd7925e5dea65e16435f99693b14cf (patch)
tree3ab10f3ef1a25950cf4a930211b424e64ca7e80b /ospfd/ospfd.c
parentMerge pull request #8556 from donaldsharp/bgp_pbr_weird (diff)
downloadfrr-b46538c4a3dd7925e5dea65e16435f99693b14cf.tar.xz
frr-b46538c4a3dd7925e5dea65e16435f99693b14cf.zip
ospfd: fix "default-information originate" in non-existing vrf
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>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index cc1404e5e..7505f24ae 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -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 */