diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-02-11 14:49:12 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-06-11 17:10:47 +0200 |
commit | 4c634658a6aaf835eff892f7ac959aef9f0c59c8 (patch) | |
tree | 592d73567658aa3f75a52907ca2856debb0f9c8e /ospfd/ospf_vty.c | |
parent | Merge pull request #4482 from opensourcerouting/warnings-20190606 (diff) | |
download | frr-4c634658a6aaf835eff892f7ac959aef9f0c59c8.tar.xz frr-4c634658a6aaf835eff892f7ac959aef9f0c59c8.zip |
ospf, ospf6d, zebra, lib: change if_get_by_name prototype with vrf
vrf pointer is used as reference when calling if_get_by_name() function.
this will permit to create interfaces with an unknown vrf_id, since it
is only necessary to get the vrf structure to store the interfaces.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'ospfd/ospf_vty.c')
-rw-r--r-- | ospfd/ospf_vty.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 631465fb2..a2444c9ea 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -457,13 +457,14 @@ DEFUN (ospf_passive_interface, int ret; struct ospf_if_params *params; struct route_node *rn; + struct vrf *vrf = vrf_lookup_by_id(ospf->vrf_id); if (strmatch(argv[1]->text, "default")) { ospf_passive_interface_default(ospf, OSPF_IF_PASSIVE); return CMD_SUCCESS; } if (ospf->vrf_id != VRF_UNKNOWN) - ifp = if_get_by_name(argv[1]->arg, ospf->vrf_id); + ifp = if_get_by_name(argv[1]->arg, vrf); if (ifp == NULL) { vty_out(vty, "interface %s not found.\n", (char *)argv[1]->arg); @@ -529,6 +530,7 @@ DEFUN (no_ospf_passive_interface, struct ospf_if_params *params; int ret; struct route_node *rn; + struct vrf *vrf = vrf_lookup_by_id(ospf->vrf_id); if (strmatch(argv[2]->text, "default")) { ospf_passive_interface_default(ospf, OSPF_IF_ACTIVE); @@ -536,7 +538,7 @@ DEFUN (no_ospf_passive_interface, } if (ospf->vrf_id != VRF_UNKNOWN) - ifp = if_get_by_name(argv[2]->arg, ospf->vrf_id); + ifp = if_get_by_name(argv[2]->arg, vrf); if (ifp == NULL) { vty_out(vty, "interface %s not found.\n", (char *)argv[2]->arg); |