From: Renato Westphal Date: Fri, 19 Oct 2018 18:55:41 +0000 (-0300) Subject: ospf6d: fix two "show" commands X-Git-Tag: frr-7.1-dev~253^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=25ee05c93879487a9a6cd1d604b42ba2c71ee1f8;p=matthieu%2Ffrr.git 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 --- 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