diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-05 19:26:19 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-05 19:31:22 +0300 |
| commit | 7bced643b977e48bc36791614c949ddf19bc97a1 (patch) | |
| tree | 0148ac46b87388d552f4499987d8299604446a20 /ospfd/ospf_zebra.h | |
| parent | de11c1bc24d4c729ed715fd5fddc0478d7d6d466 (diff) | |
ospfd: fix redistribution config when vrf doesn't exist
Currently ospfd relies on vrf bitmaps in zclient to check that the
redistribution is configured. This doesn't work when the VRF for OSPF
instance doesn't exist yet, because vrf bitmaps ignore VRF_UNKNOWN id.
Because of this, the following problems occur when the VRF doesn't exist:
- repeated "redistribute smth" command is processed as a first-time
instead of an update
- "no redistribute smth" doesn't work at all
This commit fixes both issues by relying on internal redistribution
config instead of zclient vrf bitmaps.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospfd/ospf_zebra.h')
| -rw-r--r-- | ospfd/ospf_zebra.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ospfd/ospf_zebra.h b/ospfd/ospf_zebra.h index bdc8af0402..3f4edfa29c 100644 --- a/ospfd/ospf_zebra.h +++ b/ospfd/ospf_zebra.h @@ -78,10 +78,12 @@ extern struct ospf_redist *ospf_redist_add(struct ospf *, uint8_t, unsigned short); extern void ospf_redist_del(struct ospf *, uint8_t, unsigned short); -extern int ospf_redistribute_set(struct ospf *, int, unsigned short, int, int); +extern int ospf_redistribute_update(struct ospf *, struct ospf_redist *, int, + unsigned short, int, int); +extern int ospf_redistribute_set(struct ospf *, struct ospf_redist *, int, + unsigned short, int, int); extern int ospf_redistribute_unset(struct ospf *, int, unsigned short); extern int ospf_redistribute_default_set(struct ospf *, int, int, int); -extern int ospf_redistribute_default_unset(struct ospf *); extern int ospf_distribute_list_out_set(struct ospf *, int, const char *); extern int ospf_distribute_list_out_unset(struct ospf *, int, const char *); extern void ospf_routemap_set(struct ospf_redist *, const char *); |
