diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-18 01:23:35 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-18 01:23:35 +0300 |
| commit | b46538c4a3dd7925e5dea65e16435f99693b14cf (patch) | |
| tree | 3ab10f3ef1a25950cf4a930211b424e64ca7e80b | |
| parent | a63273a5b48bcae375af39928bafafadc6a31e0c (diff) | |
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>
| -rw-r--r-- | ospfd/ospfd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index cc1404e5e9..7505f24aef 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 */ |
