From: Ondrej Zajicek (work) Date: Thu, 29 Aug 2019 18:58:16 +0000 (+0200) Subject: OSPF: Fix 'show ospf lsadb' cmd without proto arg X-Git-Tag: v2.0.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56d8b1e7f6252158caf0ecd3147376b858b16d97;p=thirdparty%2Fbird.git OSPF: Fix 'show ospf lsadb' cmd without proto arg It crashed when used without protocol argument. Thanks to Alexander for the bugreport. --- diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index 2ec8c0b62..f631a6493 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -537,7 +537,12 @@ CF_CLI(SHOW OSPF STATE ALL, optproto opttext, [], [[Show information about CF_CLI_HELP(SHOW OSPF LSADB, ..., [[Show content of OSPF LSA database]]); CF_CLI(SHOW OSPF LSADB, lsadb_args, [global | area | link] [type ] [lsid ] [self | router ] [], [[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 */ {