diff options
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 2b65be82..bc0b477e 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -14,9 +14,9 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with GNU Zebra; see the file COPYING. If not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #include <zebra.h> @@ -98,7 +98,7 @@ ospf6_top_route_hook_remove (struct ospf6_route *route) static void ospf6_top_brouter_hook_add (struct ospf6_route *route) { - ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); + ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (route->prefix)); ospf6_asbr_lsentry_add (route); ospf6_abr_originate_summary (route); } @@ -106,7 +106,7 @@ ospf6_top_brouter_hook_add (struct ospf6_route *route) static void ospf6_top_brouter_hook_remove (struct ospf6_route *route) { - ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); + ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (route->prefix)); ospf6_asbr_lsentry_remove (route); ospf6_abr_originate_summary (route); } @@ -192,7 +192,7 @@ ospf6_disable (struct ospf6 *o) if (! CHECK_FLAG (o->flag, OSPF6_DISABLED)) { SET_FLAG (o->flag, OSPF6_DISABLED); - + for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) ospf6_area_disable (oa); @@ -232,7 +232,7 @@ ospf6_maxage_remover (struct thread *thread) { for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) OSPF6_LSDB_MAXAGE_REMOVER (oi->lsdb); - + OSPF6_LSDB_MAXAGE_REMOVER (oa->lsdb); } OSPF6_LSDB_MAXAGE_REMOVER (o->lsdb); @@ -523,9 +523,11 @@ DEFUN (show_ipv6_ospf6_route_match, "Display routes which match the specified route\n" ) { - const char *sargv[CMD_ARGC_MAX]; + const char** sargv ; int i, sargc; + sargv = XMALLOC(MTYPE_TMP, (argc + 2) * sizeof(char*)) ; + /* copy argv to sargv and then append "match" */ for (i = 0; i < argc; i++) sargv[i] = argv[i]; @@ -534,6 +536,8 @@ DEFUN (show_ipv6_ospf6_route_match, sargv[sargc] = NULL; ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); + + XFREE(MTYPE_TMP, sargv) ; return CMD_SUCCESS; } @@ -549,9 +553,11 @@ DEFUN (show_ipv6_ospf6_route_match_detail, "Detailed information\n" ) { - const char *sargv[CMD_ARGC_MAX]; + const char** sargv ; int i, sargc; + sargv = XMALLOC(MTYPE_TMP, (argc + 2) * sizeof(char*)) ; + /* copy argv to sargv and then append "match" and "detail" */ for (i = 0; i < argc; i++) sargv[i] = argv[i]; @@ -561,6 +567,7 @@ DEFUN (show_ipv6_ospf6_route_match_detail, sargv[sargc] = NULL; ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); + XFREE(MTYPE_TMP, sargv) ; return CMD_SUCCESS; } @@ -614,9 +621,11 @@ DEFUN (show_ipv6_ospf6_route_type_detail, "Detailed information\n" ) { - const char *sargv[CMD_ARGC_MAX]; + const char** sargv ; int i, sargc; + sargv = XMALLOC(MTYPE_TMP, (argc + 2) * sizeof(char*)) ; + /* copy argv to sargv and then append "detail" */ for (i = 0; i < argc; i++) sargv[i] = argv[i]; @@ -625,6 +634,7 @@ DEFUN (show_ipv6_ospf6_route_type_detail, sargv[sargc] = NULL; ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); + XFREE(MTYPE_TMP, sargv) ; return CMD_SUCCESS; } |