/* Do any needed per-NS data structure allocation. */
zns->if_table = route_table_init();
- zebra_vxlan_ns_init(zns);
return 0;
}
static int zebra_ns_disable_internal(struct zebra_ns *zns, bool complete)
{
route_table_finish(zns->if_table);
- zebra_vxlan_ns_disable(zns);
#if defined(HAVE_RTADV)
rtadv_terminate(zns);
#endif
/* Do any needed per-NS data structure allocation. */
dzns->if_table = route_table_init();
- zebra_vxlan_ns_init(dzns);
/* Register zebra VRF callbacks, create and activate default VRF. */
zebra_vrf_init();
#include "zebra_router.h"
#include "zebra_memory.h"
#include "zebra_pbr.h"
+#include "zebra_vxlan.h"
struct zebra_router zrouter;
zebra_router_free_table(zrt);
}
+ zebra_vxlan_disable();
hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);
hash_free(zrouter.rules_hash);
void zebra_router_init(void)
{
- zrouter.l3vni_table = NULL;
-
+ zebra_vxlan_init();
zrouter.rules_hash = hash_create_size(8, zebra_pbr_rules_hash_key,
zebra_pbr_rules_hash_equal,
"Rules Hash");
}
/* init the l3vni table */
-void zebra_vxlan_ns_init(struct zebra_ns *zns)
+void zebra_vxlan_init(void)
{
zrouter.l3vni_table = hash_create(l3vni_hash_keymake, l3vni_hash_cmp,
"Zebra VRF L3 VNI table");
}
/* free l3vni table */
-void zebra_vxlan_ns_disable(struct zebra_ns *zns)
+void zebra_vxlan_disable(void)
{
hash_free(zrouter.l3vni_table);
}
extern void zebra_vxlan_init_tables(struct zebra_vrf *zvrf);
extern void zebra_vxlan_close_tables(struct zebra_vrf *);
extern void zebra_vxlan_cleanup_tables(struct zebra_vrf *);
-extern void zebra_vxlan_ns_init(struct zebra_ns *zns);
-extern void zebra_vxlan_ns_disable(struct zebra_ns *zns);
+extern void zebra_vxlan_init(void);
+extern void zebra_vxlan_disable(void);
extern void zebra_vxlan_evpn_vrf_route_add(vrf_id_t vrf_id,
struct ethaddr *rmac,
struct ipaddr *ip,