mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
pimd: fixup pim_channel_oil_empty macro
The macro was always returning non-empty because of comparing an array of u8_t with an array of u32_t. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
db431af290
commit
d86632fba3
@ -646,19 +646,11 @@ int pim_channel_add_oif(struct channel_oil *channel_oil, struct interface *oif,
|
|||||||
|
|
||||||
int pim_channel_oil_empty(struct channel_oil *c_oil)
|
int pim_channel_oil_empty(struct channel_oil *c_oil)
|
||||||
{
|
{
|
||||||
static uint32_t zero[MAXVIFS];
|
static struct mfcctl null_oil;
|
||||||
static int inited = 0;
|
|
||||||
|
|
||||||
if (!c_oil)
|
if (!c_oil)
|
||||||
return 1;
|
return 1;
|
||||||
/*
|
|
||||||
* Not sure that this is necessary, but I would rather ensure
|
|
||||||
* that this works.
|
|
||||||
*/
|
|
||||||
if (!inited) {
|
|
||||||
memset(&zero, 0, sizeof(uint32_t) * MAXVIFS);
|
|
||||||
inited = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return !memcmp(c_oil->oil.mfcc_ttls, zero, MAXVIFS * sizeof(uint32_t));
|
return !memcmp(c_oil->oil.mfcc_ttls,
|
||||||
|
null_oil.mfcc_ttls, sizeof(null_oil.mfcc_ttls));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user