From 25ee05c93879487a9a6cd1d604b42ba2c71ee1f8 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 Oct 2018 15:55:41 -0300 Subject: [PATCH] ospf6d: fix two "show" commands The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept the "match" keyword when a prefix is not given, otherwise ospf6d will crash. Fixes the following crashes: ospf6d aborted: vtysh -c "show ipv6 ospf6 interface eth99 prefix match" ospf6d aborted: vtysh -c "show ipv6 ospf6 interface prefix match" Signed-off-by: Renato Westphal --- ospf6d/ospf6_interface.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 17a30188c7..2bfa4201cb 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1073,13 +1073,18 @@ DEFUN (show_ipv6_ospf6_interface_traffic, DEFUN (show_ipv6_ospf6_interface_ifname_prefix, show_ipv6_ospf6_interface_ifname_prefix_cmd, - "show ipv6 ospf6 interface IFNAME prefix [] []", + "show ipv6 ospf6 interface IFNAME prefix\ + [<\ + detail\ + | []\ + >]", SHOW_STR IP6_STR OSPF6_STR INTERFACE_STR IFNAME_STR "Display connected prefixes to advertise\n" + "Display details of the prefixes\n" OSPF6_ROUTE_ADDRESS_STR OSPF6_ROUTE_PREFIX_STR OSPF6_ROUTE_MATCH_STR @@ -1111,12 +1116,17 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, DEFUN (show_ipv6_ospf6_interface_prefix, show_ipv6_ospf6_interface_prefix_cmd, - "show ipv6 ospf6 interface prefix [] []", + "show ipv6 ospf6 interface prefix\ + [<\ + detail\ + | []\ + >]", SHOW_STR IP6_STR OSPF6_STR INTERFACE_STR "Display connected prefixes to advertise\n" + "Display details of the prefixes\n" OSPF6_ROUTE_ADDRESS_STR OSPF6_ROUTE_PREFIX_STR OSPF6_ROUTE_MATCH_STR -- 2.39.5