diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2019-02-26 09:49:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-26 09:49:57 +0100 |
| commit | 62806752ac85fccb7bf98bc35d6c403b7991d3b3 (patch) | |
| tree | 5386688c46aa382b4b9d17fd20fa2219c147f541 | |
| parent | bf99288b5186480d1a3f6565509fca97c289c66f (diff) | |
| parent | f4aaa447324c02a501fe8b2bbb48bc817d764220 (diff) | |
Merge pull request #3867 from donaldsharp/ospf_allow_vrf_starup_7.0
[7.0] ospfd: Allow pre-existing vrf's to work
| -rw-r--r-- | ospfd/ospfd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index a18e2de725..073a51561b 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -234,8 +234,12 @@ static struct ospf *ospf_new(unsigned short instance, const char *name) new->instance = instance; new->router_id.s_addr = htonl(0); new->router_id_static.s_addr = htonl(0); - if (name && !strmatch(name, VRF_DEFAULT_NAME)) { - new->vrf_id = VRF_UNKNOWN; + if (name) { + vrf = vrf_lookup_by_name(name); + if (vrf) + new->vrf_id = vrf->vrf_id; + else + new->vrf_id = VRF_UNKNOWN; /* Freed in ospf_finish_final */ new->name = XSTRDUP(MTYPE_OSPF_TOP, name); if (IS_DEBUG_OSPF_EVENT) |
