vxlan_sg = hash_get(pim->vxlan.sg_hash, vxlan_sg, hash_alloc_intern);
+ /* we register with the MLAG daemon in the first VxLAN SG and never
+ * de-register during that life of the pimd
+ */
+ if (pim->vxlan.sg_hash->count == 1) {
+ vxlan_mlag.flags |= PIM_VXLAN_MLAGF_DO_REG;
+ pim_mlag_register();
+ }
+
return vxlan_sg;
}
}
/******************************* MLAG handling *******************************/
+bool pim_vxlan_do_mlag_reg(void)
+{
+ return (vxlan_mlag.flags & PIM_VXLAN_MLAGF_DO_REG);
+}
+
/* The peerlink sub-interface is added as an OIF to the origination-mroute.
* This is done to send a copy of the multicast-vxlan encapsulated traffic
* to the MLAG peer which may mroute it over the underlay if there are any
enum pim_vxlan_mlag_flags {
PIM_VXLAN_MLAGF_NONE = 0,
- PIM_VXLAN_MLAGF_ENABLED = (1 << 0)
+ PIM_VXLAN_MLAGF_ENABLED = (1 << 0),
+ PIM_VXLAN_MLAGF_DO_REG = (1 << 1)
};
enum pim_vxlan_mlag_role {
struct interface *peerlink_rif,
struct in_addr *reg_addr);
extern void pim_vxlan_config_write(struct vty *vty, char *spaces, int *writes);
+extern bool pim_vxlan_do_mlag_reg(void);
#endif /* PIM_VXLAN_H */