summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorDon Slice <dslice@nvidia.com>2021-05-19 20:23:28 +0200
committerDon Slice <dslice@nvidia.com>2021-05-20 18:09:27 +0200
commitb56114aa9e6cafd4ee4c27bc47e48a1d3b775cb3 (patch)
tree637d8d6a12fc8d4496cf8f8d0db6008cd899d0b4 /ospfd
parentMerge pull request #8703 from donaldsharp/ospf_tab (diff)
downloadfrr-b56114aa9e6cafd4ee4c27bc47e48a1d3b775cb3.tar.xz
frr-b56114aa9e6cafd4ee4c27bc47e48a1d3b775cb3.zip
ospfd: "ip ospf area" command can select wrong process
Found that in some circumstances, when the "ip ospf area" command was entered for the default vrf, the wrong ospf process would be used to check for the presence of a "network" statement, causing the "ip ospf area" command to be rejected. This was due to the command using the ospf instance lookup to find the right ospf process, which can be in error depending on when the processes were created. Signed-off-by: Don Slice <dslice@nvidia.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 04b6bdd96..fb2d79053 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -8926,7 +8926,7 @@ DEFUN (ip_ospf_area,
argv_find(argv, argc, "area", &idx);
areaid = argv[idx + 1]->arg;
- if (ifp->vrf_id && !instance)
+ if (!instance)
ospf = ospf_lookup_by_vrf_id(ifp->vrf_id);
else
ospf = ospf_lookup_instance(instance);
@@ -9050,7 +9050,7 @@ DEFUN (no_ip_ospf_area,
if (argv_find(argv, argc, "(1-65535)", &idx))
instance = strtol(argv[idx]->arg, NULL, 10);
- if (ifp->vrf_id && !instance)
+ if (!instance)
ospf = ospf_lookup_by_vrf_id(ifp->vrf_id);
else
ospf = ospf_lookup_instance(instance);