diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2021-10-19 16:57:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-19 16:57:57 -0500 |
| commit | 79c23c450d118be8a54ca128156064ed1b76c55f (patch) | |
| tree | 9843dac46f3acc9d73a3b245c7ca7627d3232b36 /ospfd/ospf_vty.c | |
| parent | cc6a70422173d3fba7416aad87bd566387d2bff7 (diff) | |
| parent | 9f4ffd809a24b55da45198e07e7232679dd75a8c (diff) | |
Merge pull request #9845 from idryzhov/8.1-ospf-vlink-crashfrr-8.1-rc2
[8.1] ospfd: fix crash when creating vlink in unknown vrf
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 4109ada64a..f998f2e5f2 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -892,6 +892,12 @@ ospf_find_vl_data(struct ospf *ospf, struct ospf_vl_config_data *vl_config) vl_data = ospf_vl_data_new(area, vl_config->vl_peer); if (vl_data->vl_oi == NULL) { vl_data->vl_oi = ospf_vl_new(ospf, vl_data); + if (!vl_data->vl_oi) { + ospf_vl_data_free(vl_data); + vty_out(vty, + "Can't create VL, check logs for more information\n"); + return NULL; + } ospf_vl_add(ospf, vl_data); ospf_spf_calculate_schedule(ospf, SPF_FLAG_CONFIG_CHANGE); |
