diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-01-28 02:41:07 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-02-24 15:31:20 +0300 | 
| commit | 409f98ab443682ec360e3e76954f1c8985b3371d (patch) | |
| tree | 817839e523aed152eae3f7336ef4cb431538cb99 /ospfd/ospfd.h | |
| parent | 0ff791138668c50a1c60b209333091682d8926d3 (diff) | |
ospfd: don't rely on instance existence in vty
Store instance index at startup and use it when processing vty commands.
The instance itself may be created and deleted by the user in runtime
using `[no] router ospf X` command.
Fixes #7908
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospfd/ospfd.h')
| -rw-r--r-- | ospfd/ospfd.h | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 954a469b68..5148bf555c 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -633,6 +633,7 @@ struct ospf_nbr_nbma {  /* Extern variables. */  extern struct ospf_master *om; +extern unsigned short ospf_instance;  extern const int ospf_redistributed_proto_max;  extern struct zclient *zclient;  extern struct thread_master *master; @@ -642,10 +643,10 @@ extern struct zebra_privs_t ospfd_privs;  /* Prototypes. */  extern const char *ospf_redist_string(unsigned int route_type);  extern struct ospf *ospf_lookup_instance(unsigned short); +extern struct ospf *ospf_lookup(unsigned short instance, const char *name);  extern struct ospf *ospf_get(unsigned short instance, const char *name,  			     bool *created);  extern struct ospf *ospf_new_alloc(unsigned short instance, const char *name); -extern struct ospf *ospf_get_instance(unsigned short, bool *created);  extern struct ospf *ospf_lookup_by_inst_name(unsigned short instance,  					     const char *name);  extern struct ospf *ospf_lookup_by_vrf_id(vrf_id_t vrf_id);  | 
