ioam: do not reuse existing vnet symbol 84/26684/2
authorBenoît Ganne <bganne@cisco.com>
Fri, 24 Apr 2020 07:20:13 +0000 (09:20 +0200)
committerDave Barach <openvpp@barachs.net>
Mon, 27 Apr 2020 15:04:37 +0000 (15:04 +0000)
vxlan_gpe_init() is already defined in libvnet. When loading ioam plugin
we end up having 2 different objects using the same symbol.
ASan in GCC-10 started to enforce the One-Definition-Rule and it seems
like good hygiene anyway.

Type: fix

Change-Id: I2ea9af1821bca6482a290742e9a109fc25692f37
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_api.c

index 6255ce5..9f6d181 100644 (file)
@@ -204,7 +204,7 @@ static void vl_api_vxlan_gpe_ioam_transit_disable_t_handler
 
 #include <ioam/lib-vxlan-gpe/ioam_vxlan_gpe.api.c>
 static clib_error_t *
-vxlan_gpe_init (vlib_main_t * vm)
+ioam_vxlan_gpe_init (vlib_main_t * vm)
 {
   vxlan_gpe_ioam_main_t *sm = &vxlan_gpe_ioam_main;
   u32 encap_node_index = vxlan_gpe_encap_ioam_v4_node.index;
@@ -242,7 +242,7 @@ vxlan_gpe_init (vlib_main_t * vm)
   return 0;
 }
 
-VLIB_INIT_FUNCTION (vxlan_gpe_init);
+VLIB_INIT_FUNCTION (ioam_vxlan_gpe_init);
 
 /*
  * fd.io coding-style-patch-verification: ON