diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2019-09-20 19:56:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 19:56:44 +0200 |
commit | 60aecb43e815fe58a89d55045627486d84b8a27a (patch) | |
tree | 90793cbf2f25566261ea8ed76e66d6bff7e493d7 | |
parent | Merge pull request #5024 from donaldsharp/send_that_error_bgp (diff) | |
parent | isisd: Add vrf_id to the main isis structure (diff) | |
download | frr-60aecb43e815fe58a89d55045627486d84b8a27a.tar.xz frr-60aecb43e815fe58a89d55045627486d84b8a27a.zip |
Merge pull request #4529 from donaldsharp/vrf_conversions
Vrf conversions
-rw-r--r-- | isisd/isis_main.c | 2 | ||||
-rw-r--r-- | isisd/isisd.c | 3 | ||||
-rw-r--r-- | isisd/isisd.h | 3 | ||||
-rw-r--r-- | ospf6d/ospf6_top.c | 5 | ||||
-rw-r--r-- | ospf6d/ospf6_top.h | 3 |
5 files changed, 11 insertions, 5 deletions
diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 7f49e9d89..718924daf 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -243,7 +243,7 @@ int main(int argc, char **argv, char **envp) mt_init(); /* create the global 'isis' instance */ - isis_new(1); + isis_new(1, VRF_DEFAULT); isis_zebra_init(master); isis_bfd_init(); diff --git a/isisd/isisd.c b/isisd/isisd.c index 67f557ab5..029a9e068 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -75,12 +75,13 @@ int clear_isis_neighbor_common(struct vty *, const char *id); int isis_config_write(struct vty *); -void isis_new(unsigned long process_id) +void isis_new(unsigned long process_id, vrf_id_t vrf_id) { isis = XCALLOC(MTYPE_ISIS, sizeof(struct isis)); /* * Default values */ + isis->vrf_id = vrf_id; isis->max_area_addrs = 3; isis->process_id = process_id; isis->router_id = 0; diff --git a/isisd/isisd.h b/isisd/isisd.h index 308f018c1..f825b6ecb 100644 --- a/isisd/isisd.h +++ b/isisd/isisd.h @@ -62,6 +62,7 @@ extern struct zebra_privs_t isisd_privs; struct fabricd; struct isis { + vrf_id_t vrf_id; unsigned long process_id; int sysid_set; uint8_t sysid[ISIS_SYS_ID_LEN]; /* SystemID for this IS */ @@ -189,7 +190,7 @@ struct isis_area { DECLARE_QOBJ_TYPE(isis_area) void isis_init(void); -void isis_new(unsigned long); +void isis_new(unsigned long process_id, vrf_id_t vrf_id); struct isis_area *isis_area_create(const char *); struct isis_area *isis_area_lookup(const char *); int isis_area_get(struct vty *vty, const char *area_tag); diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 40c612381..95dafff84 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -136,7 +136,7 @@ static void ospf6_top_brouter_hook_remove(struct ospf6_route *route) ospf6_abr_originate_summary(route); } -static struct ospf6 *ospf6_create(void) +static struct ospf6 *ospf6_create(vrf_id_t vrf_id) { struct ospf6 *o; @@ -144,6 +144,7 @@ static struct ospf6 *ospf6_create(void) /* initialize */ monotime(&o->starttime); + o->vrf_id = vrf_id; o->area_list = list_new(); o->area_list->cmp = ospf6_area_cmp; o->lsdb = ospf6_lsdb_create(o); @@ -325,7 +326,7 @@ DEFUN_NOSH (router_ospf6, OSPF6_STR) { if (ospf6 == NULL) { - ospf6 = ospf6_create(); + ospf6 = ospf6_create(VRF_DEFAULT); if (ospf6->router_id == 0) ospf6_router_id_update(); } diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h index 381027dcf..ba41fca65 100644 --- a/ospf6d/ospf6_top.h +++ b/ospf6d/ospf6_top.h @@ -31,6 +31,9 @@ struct ospf6_master { /* OSPFv3 top level data structure */ struct ospf6 { + /* The relevant vrf_id */ + vrf_id_t vrf_id; + /* my router id */ uint32_t router_id; |