summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-06-18 00:45:48 +0000
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-06-18 00:45:48 +0000
commit6e72cb6a0940bd3dae2d4f023ef94f84af3b723c (patch)
treeaea521920a7ca445193796e472c4a273cd53cead /ospfd
parent2cb87162369af61475b543280860bc7b1c0b7c49 (diff)
[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')
-rw-r--r--ospfd/ChangeLog7
-rw-r--r--ospfd/ospf_vty.c16
2 files changed, 9 insertions, 14 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index b7f2c95f..779a2b61 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* ospf_interface.h: (struct ospf_if_info) Add reference counts
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);