]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospf6d: fix two "show" commands
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 19 Oct 2018 18:55:41 +0000 (15:55 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 20 Oct 2018 15:39:05 +0000 (12:39 -0300)
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 <renato@opensourcerouting.org>
ospf6d/ospf6_interface.c

index 17a30188c7304879f183dd38648433fdcac1e098..2bfa4201cbce5bed54f907745c25223ba198f630 100644 (file)
@@ -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 [<X:X::X:X|X:X::X:X/M>] [<match|detail>]",
+       "show ipv6 ospf6 interface IFNAME prefix\
+          [<\
+           detail\
+           |<X:X::X:X|X:X::X:X/M> [<match|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 [<X:X::X:X|X:X::X:X/M>] [<match|detail>]",
+       "show ipv6 ospf6 interface prefix\
+          [<\
+           detail\
+           |<X:X::X:X|X:X::X:X/M> [<match|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