]> git.proxmox.com Git - mirror_frr.git/blobdiff - tests/bgpd/test_mpath.c
*: auto-convert to SPDX License IDs
[mirror_frr.git] / tests / bgpd / test_mpath.c
index 92efd4c3d612b3a0e9d61ff7526cf005303eb0be..3662805971ae30d2ea3322943dd2ba856f7972fe 100644 (file)
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * BGP Multipath Unit Test
  * Copyright (C) 2010 Google Inc.
  *
  * This file is part of Quagga
- *
- * Quagga is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * Quagga is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
@@ -310,7 +297,7 @@ static int setup_bgp_path_info_mpath_update(testcase_t *t)
        str2prefix("42.1.1.0/24", &test_rn.p);
        rt_node = bgp_dest_to_rnode(&test_rn);
        memcpy((struct route_table *)&rt_node->table, &rt->route_table,
-              sizeof(struct route_table *));
+              sizeof(struct route_table));
        setup_bgp_mp_list(t);
        for (i = 0; i < test_mp_list_info_count; i++)
                bgp_path_info_add(&test_rn, &test_mp_list_info[i]);
@@ -330,7 +317,7 @@ static int run_bgp_path_info_mpath_update(testcase_t *t)
        bgp_mp_list_add(&mp_list, &test_mp_list_info[1]);
        new_best = &test_mp_list_info[3];
        old_best = NULL;
-       bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list,
+       bgp_path_info_mpath_update(NULL, &test_rn, new_best, old_best, &mp_list,
                                   &mp_cfg);
        bgp_mp_list_clear(&mp_list);
        EXPECT_TRUE(bgp_path_info_mpath_count(new_best) == 2, test_result);
@@ -345,7 +332,7 @@ static int run_bgp_path_info_mpath_update(testcase_t *t)
        bgp_mp_list_add(&mp_list, &test_mp_list_info[1]);
        new_best = &test_mp_list_info[0];
        old_best = &test_mp_list_info[3];
-       bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list,
+       bgp_path_info_mpath_update(NULL, &test_rn, new_best, old_best, &mp_list,
                                   &mp_cfg);
        bgp_mp_list_clear(&mp_list);
        EXPECT_TRUE(bgp_path_info_mpath_count(new_best) == 1, test_result);
@@ -392,9 +379,9 @@ static int global_test_init(void)
 {
        qobj_init();
        master = thread_master_create(NULL);
-       zclient = zclient_new(master, &zclient_options_default);
+       zclient = zclient_new(master, &zclient_options_default, NULL, 0);
        bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
-       vrf_init(NULL, NULL, NULL, NULL, NULL);
+       vrf_init(NULL, NULL, NULL, NULL);
        bgp_option_set(BGP_OPT_NO_LISTEN);
 
        if (fileno(stdout) >= 0)