mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-24 17:46:11 +00:00
pimd: use bool instead of int to pass true/false
In pim_if_new use bool instead of an int to pass true/false values for what we should create the pim interface type for. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
59752d4ea5
commit
85a13586ed
@ -5766,8 +5766,7 @@ static int pim_cmd_igmp_start(struct vty *vty, struct interface *ifp)
|
||||
pim_ifp = ifp->info;
|
||||
|
||||
if (!pim_ifp) {
|
||||
pim_ifp = pim_if_new(ifp, 1 /* igmp=true */, 0 /* pim=false */,
|
||||
false);
|
||||
pim_ifp = pim_if_new(ifp, true, false, false);
|
||||
if (!pim_ifp) {
|
||||
vty_out(vty, "Could not enable IGMP on interface %s\n",
|
||||
ifp->name);
|
||||
@ -6378,8 +6377,7 @@ static int pim_cmd_interface_add(struct interface *ifp)
|
||||
struct pim_interface *pim_ifp = ifp->info;
|
||||
|
||||
if (!pim_ifp) {
|
||||
pim_ifp = pim_if_new(ifp, 0 /* igmp=false */, 1 /* pim=true */,
|
||||
false);
|
||||
pim_ifp = pim_if_new(ifp, false, true, false);
|
||||
if (!pim_ifp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ static int pim_sec_addr_comp(const void *p1, const void *p2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim,
|
||||
struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
|
||||
bool ispimreg)
|
||||
{
|
||||
struct pim_interface *pim_ifp;
|
||||
@ -1468,7 +1468,7 @@ void pim_if_create_pimreg(struct pim_instance *pim)
|
||||
pim->regiface = if_create(pimreg_name, pim->vrf_id);
|
||||
pim->regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF;
|
||||
|
||||
pim_if_new(pim->regiface, 0, 0, true);
|
||||
pim_if_new(pim->regiface, false, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ struct pim_interface {
|
||||
void pim_if_init(struct pim_instance *pim);
|
||||
void pim_if_terminate(struct pim_instance *pim);
|
||||
|
||||
struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim,
|
||||
struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
|
||||
bool ispimreg);
|
||||
void pim_if_delete(struct interface *ifp);
|
||||
void pim_if_addr_add(struct connected *ifc);
|
||||
|
||||
@ -112,7 +112,7 @@ static int pim_zebra_if_add(int command, struct zclient *zclient,
|
||||
struct pim_interface *pim_ifp;
|
||||
|
||||
if (!ifp->info) {
|
||||
pim_ifp = pim_if_new(ifp, 0, 0, false);
|
||||
pim_ifp = pim_if_new(ifp, false, false, false);
|
||||
ifp->info = pim_ifp;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user