mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:02:58 +00:00
pimd: try to reinstall MFC when we get NOCACHE
Whether due to a pimd bug, some expiry, or someone just deleting MFC entries, when we're in NOCACHE we *know* there's no MFC entry. Add an install call to make sure pimd's MFC view aligns with the actual kernel MFC. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
48477d5802
commit
94c2ec42c4
@ -47,6 +47,8 @@
|
|||||||
#include "pim_msg.h"
|
#include "pim_msg.h"
|
||||||
|
|
||||||
static void mroute_read_on(struct pim_instance *pim);
|
static void mroute_read_on(struct pim_instance *pim);
|
||||||
|
static int pim_upstream_mroute_update(struct channel_oil *c_oil,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
int pim_mroute_set(struct pim_instance *pim, int enable)
|
int pim_mroute_set(struct pim_instance *pim, int enable)
|
||||||
{
|
{
|
||||||
@ -160,6 +162,7 @@ int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg)
|
|||||||
struct pim_upstream *up;
|
struct pim_upstream *up;
|
||||||
struct pim_rpf *rpg;
|
struct pim_rpf *rpg;
|
||||||
pim_sgaddr sg;
|
pim_sgaddr sg;
|
||||||
|
bool desync = false;
|
||||||
|
|
||||||
memset(&sg, 0, sizeof(sg));
|
memset(&sg, 0, sizeof(sg));
|
||||||
sg.src = msg->msg_im_src;
|
sg.src = msg->msg_im_src;
|
||||||
@ -232,6 +235,12 @@ int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg)
|
|||||||
|
|
||||||
up = pim_upstream_find_or_add(&sg, ifp, PIM_UPSTREAM_FLAG_MASK_FHR,
|
up = pim_upstream_find_or_add(&sg, ifp, PIM_UPSTREAM_FLAG_MASK_FHR,
|
||||||
__func__);
|
__func__);
|
||||||
|
if (up->channel_oil->installed) {
|
||||||
|
zlog_warn(
|
||||||
|
"%s: NOCACHE for %pSG, MFC entry disappeared - reinstalling",
|
||||||
|
ifp->name, &sg);
|
||||||
|
desync = true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I moved this debug till after the actual add because
|
* I moved this debug till after the actual add because
|
||||||
@ -255,6 +264,11 @@ int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg)
|
|||||||
/* if we have receiver, inherit from parent */
|
/* if we have receiver, inherit from parent */
|
||||||
pim_upstream_inherited_olist_decide(pim_ifp->pim, up);
|
pim_upstream_inherited_olist_decide(pim_ifp->pim, up);
|
||||||
|
|
||||||
|
/* we just got NOCACHE from the kernel, so... MFC is not in the
|
||||||
|
* kernel for some reason or another. Try installing again.
|
||||||
|
*/
|
||||||
|
if (desync)
|
||||||
|
pim_upstream_mroute_update(up->channel_oil, __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user