summaryrefslogtreecommitdiff
path: root/proto/ospf/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-08-29 20:58:16 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-08-29 20:58:16 +0200
commit56d8b1e7f6252158caf0ecd3147376b858b16d97 (patch)
treef104688a92edffb0de82c1d2ee7089769fb871af /proto/ospf/config.Y
parent32a254050d3da57ca6d7627aa606a8dce11907ee (diff)
OSPF: Fix 'show ospf lsadb' cmd without proto arg
It crashed when used without protocol argument. Thanks to Alexander for the bugreport.
Diffstat (limited to 'proto/ospf/config.Y')
-rw-r--r--proto/ospf/config.Y7
1 files changed, 6 insertions, 1 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y
index 2ec8c0b6..f631a649 100644
--- a/proto/ospf/config.Y
+++ b/proto/ospf/config.Y
@@ -537,7 +537,12 @@ CF_CLI(SHOW OSPF STATE ALL, optproto opttext, [<name>], [[Show information about
CF_CLI_HELP(SHOW OSPF LSADB, ..., [[Show content of OSPF LSA database]]);
CF_CLI(SHOW OSPF LSADB, lsadb_args, [global | area <id> | link] [type <num>] [lsid <id>] [self | router <id>] [<proto>], [[Show content of OSPF LSA database]])
-{ ospf_sh_lsadb($4); };
+{
+ if (!$4->proto)
+ $4->proto = (struct ospf_proto *) proto_get_named(NULL, &proto_ospf);
+
+ ospf_sh_lsadb($4);
+};
lsadb_args:
/* empty */ {