mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 08:28:48 +00:00
Merge pull request #12879 from opensourcerouting/pim-ssm-no-rp
pimd: don't try to check RPF for incoming SSM data
This commit is contained in:
commit
4b0d6b4244
@ -34,6 +34,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)
|
||||||
{
|
{
|
||||||
@ -145,45 +147,66 @@ int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg)
|
|||||||
{
|
{
|
||||||
struct pim_interface *pim_ifp = ifp->info;
|
struct pim_interface *pim_ifp = ifp->info;
|
||||||
struct pim_upstream *up;
|
struct pim_upstream *up;
|
||||||
struct pim_rpf *rpg;
|
|
||||||
pim_sgaddr sg;
|
pim_sgaddr sg;
|
||||||
|
bool desync = false;
|
||||||
|
|
||||||
rpg = pim_ifp ? RP(pim_ifp->pim, msg->msg_im_dst) : NULL;
|
memset(&sg, 0, sizeof(sg));
|
||||||
/*
|
sg.src = msg->msg_im_src;
|
||||||
* If the incoming interface is unknown OR
|
sg.grp = msg->msg_im_dst;
|
||||||
* the Interface type is SSM we don't need to
|
|
||||||
* do anything here
|
if (!pim_ifp) {
|
||||||
*/
|
if (PIM_DEBUG_MROUTE)
|
||||||
if (!rpg || pim_rpf_addr_is_inaddr_any(rpg)) {
|
|
||||||
if (PIM_DEBUG_MROUTE_DETAIL)
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: Interface is not configured correctly to handle incoming packet: Could be !pim_ifp, !SM, !RP",
|
"%s: PIM not enabled on interface, dropping packet to %pSG",
|
||||||
__func__);
|
ifp->name, &sg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pim_is_grp_ssm(pim_ifp->pim, sg.grp)) {
|
||||||
|
/* for ASM, check that we have enough information (i.e. path
|
||||||
|
* to RP) to make a decision on what to do with this packet.
|
||||||
|
*
|
||||||
|
* for SSM, this is meaningless, everything is join-driven,
|
||||||
|
* and for NOCACHE we need to install an empty OIL MFC entry
|
||||||
|
* so the kernel doesn't keep nagging us.
|
||||||
|
*/
|
||||||
|
struct pim_rpf *rpg;
|
||||||
|
|
||||||
|
rpg = RP(pim_ifp->pim, msg->msg_im_dst);
|
||||||
|
if (!rpg) {
|
||||||
|
if (PIM_DEBUG_MROUTE)
|
||||||
|
zlog_debug("%s: no RPF for packet to %pSG",
|
||||||
|
ifp->name, &sg);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (pim_rpf_addr_is_inaddr_any(rpg)) {
|
||||||
|
if (PIM_DEBUG_MROUTE)
|
||||||
|
zlog_debug("%s: null RPF for packet to %pSG",
|
||||||
|
ifp->name, &sg);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we've received a multicast packet that isn't connected to
|
* If we've received a multicast packet that isn't connected to
|
||||||
* us
|
* us
|
||||||
*/
|
*/
|
||||||
if (!pim_if_connected_to_source(ifp, msg->msg_im_src)) {
|
if (!pim_if_connected_to_source(ifp, msg->msg_im_src)) {
|
||||||
if (PIM_DEBUG_MROUTE_DETAIL)
|
if (PIM_DEBUG_MROUTE)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: Received incoming packet that doesn't originate on our seg",
|
"%s: incoming packet to %pSG from non-connected source",
|
||||||
__func__);
|
ifp->name, &sg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&sg, 0, sizeof(sg));
|
|
||||||
sg.src = msg->msg_im_src;
|
|
||||||
sg.grp = msg->msg_im_dst;
|
|
||||||
|
|
||||||
if (!(PIM_I_am_DR(pim_ifp))) {
|
if (!(PIM_I_am_DR(pim_ifp))) {
|
||||||
|
/* unlike the other debug messages, this one is further in the
|
||||||
|
* "normal operation" category and thus under _DETAIL
|
||||||
|
*/
|
||||||
if (PIM_DEBUG_MROUTE_DETAIL)
|
if (PIM_DEBUG_MROUTE_DETAIL)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: Interface is not the DR blackholing incoming traffic for %pSG",
|
"%s: not DR on interface, not forwarding traffic for %pSG",
|
||||||
__func__, &sg);
|
ifp->name, &sg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are not the DR, but we are still receiving packets
|
* We are not the DR, but we are still receiving packets
|
||||||
@ -204,6 +227,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
|
||||||
@ -227,6 +256,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