diff options
author | ajs <ajs> | 2006-06-18 00:45:48 +0000 |
---|---|---|
committer | ajs <ajs> | 2006-06-18 00:45:48 +0000 |
commit | 2c5437df8cb7980a8008625b6d8cc0f3c95d2751 (patch) | |
tree | d223ebd9a77dabd1e65b30cf8b8efe3840bd99b4 /ospfd/ospf_vty.c | |
parent | 3e8d1abd716d149f0cbd50c7b51fe9694516a278 (diff) | |
download | quagga-2c5437df8cb7980a8008625b6d8cc0f3c95d2751.tar.bz2 quagga-2c5437df8cb7980a8008625b6d8cc0f3c95d2751.tar.xz |
[ospfd] Fix ospf passive-interface subcommand to create interface if necessary
2006-06-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_vty.c: ({no_,}ospf_passive_interface) Replace if_lookup_by_name
with a call to if_get_by_name -- if the interface does not exist
already, it should be created. And remove the obsolete warning
message.
Diffstat (limited to 'ospfd/ospf_vty.c')
-rw-r--r-- | ospfd/ospf_vty.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 10580ab7..7c367ea2 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -261,13 +261,7 @@ DEFUN (ospf_passive_interface, struct ospf_if_params *params; struct route_node *rn; - ifp = if_lookup_by_name (argv[0]); - - if (ifp == NULL) - { - vty_out (vty, "Please specify an existing interface%s", VTY_NEWLINE); - return CMD_WARNING; - } + ifp = if_get_by_name (argv[0]); params = IF_DEF_PARAMS (ifp); @@ -331,13 +325,7 @@ DEFUN (no_ospf_passive_interface, int ret; struct route_node *rn; - ifp = if_lookup_by_name (argv[0]); - - if (ifp == NULL) - { - vty_out (vty, "Please specify an existing interface%s", VTY_NEWLINE); - return CMD_WARNING; - } + ifp = if_get_by_name (argv[0]); params = IF_DEF_PARAMS (ifp); |