+// SPDX-License-Identifier: GPL-2.0-or-later
/* PIM support for VxLAN BUM flooding
*
* Copyright (C) 2019 Cumulus Networks, Inc.
- *
- * This file is part of FRR.
- *
- * FRR 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.
- *
- * FRR 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.
- * This program 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 of the License, or
- * (at your option) any later version.
*/
#include <zebra.h>
pim_vxlan_del_work(vxlan_sg);
}
-static int pim_vxlan_work_timer_cb(struct thread *t)
+static void pim_vxlan_work_timer_cb(struct thread *t)
{
pim_vxlan_do_reg_work();
pim_vxlan_work_timer_setup(true /* start */);
- return 0;
}
/* global 1second timer used for periodic processing */
struct pim_upstream *up;
struct pim_interface *term_ifp;
int flags = 0;
- struct prefix nht_p;
struct pim_instance *pim = vxlan_sg->pim;
if (vxlan_sg->up) {
* iif
*/
if (!PIM_UPSTREAM_FLAG_TEST_STATIC_IIF(up->flags)) {
- nht_p.family = AF_INET;
- nht_p.prefixlen = IPV4_MAX_BITLEN;
- nht_p.u.prefix4 = up->upstream_addr;
- pim_delete_tracked_nexthop(vxlan_sg->pim, &nht_p, up,
- NULL);
+ pim_delete_tracked_nexthop(vxlan_sg->pim,
+ up->upstream_addr, up, NULL);
}
/* We are acting FHR; clear out use_rpt setting if any */
pim_upstream_update_use_rpt(up, false /*update_mroute*/);
*/
pim = pim_get_pim_instance(VRF_DEFAULT);
+ if (!pim) {
+ if (PIM_DEBUG_VXLAN)
+ zlog_debug("%s: Unable to find pim instance", __func__);
+ return;
+ }
+
if (enable)
vxlan_mlag.flags |= PIM_VXLAN_MLAGF_ENABLED;
else
/* enable pim on the term ifp */
pim_ifp = (struct pim_interface *)ifp->info;
if (pim_ifp) {
- PIM_IF_DO_PIM(pim_ifp->options);
+ pim_ifp->pim_enable = true;
/* ifp is already oper up; activate it as a term dev */
if (pim_ifp->mroute_vif_index >= 0)
pim_vxlan_term_oif_update(pim, ifp);
pim_ifp = (struct pim_interface *)ifp->info;
if (pim_ifp) {
- PIM_IF_DONT_PIM(pim_ifp->options);
- if (!PIM_IF_TEST_IGMP(pim_ifp->options))
+ pim_ifp->pim_enable = false;
+ if (!pim_ifp->gm_enable)
pim_if_delete(ifp);
}
}