diff options
author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-03-26 21:38:53 +0100 |
---|---|---|
committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-04-20 17:33:21 +0200 |
commit | 7d9733230b179d1e9d34ee00ba34d03c14e95cb3 (patch) | |
tree | dd95d81c47e943521247dd81616bc3458b340908 /pimd/pim_oil.c | |
parent | pimd: provide a mechanism to pin the IIF for an SG entry (diff) | |
download | frr-7d9733230b179d1e9d34ee00ba34d03c14e95cb3.tar.xz frr-7d9733230b179d1e9d34ee00ba34d03c14e95cb3.zip |
pimd: allow mroutes with IIF in the OIL
This is specifically needed to allow pim-evpn mroutes in the MLAG setup -
(36.0.0.11, 239.1.1.100) Iif: peerlink.4094 Oifs: uplink-1, peerlink.4094
I could have gone the other way and disabled PIM_ENFORCE_LOOPFREE_MFC but
that opens the door too wide. Relaxing the checks for mlag-specific mroutes
seemed like the safer choice.
This commit provides the infrastructure to relax checks on a per-mroute
basis.
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_oil.c')
-rw-r--r-- | pimd/pim_oil.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index 55d26113f..5945bc55f 100644 --- a/pimd/pim_oil.c +++ b/pimd/pim_oil.c @@ -320,6 +320,7 @@ int pim_channel_add_oif(struct channel_oil *channel_oil, struct interface *oif, { struct pim_interface *pim_ifp; int old_ttl; + bool allow_iif_in_oil = false; /* * If we've gotten here we've gone bad, but let's @@ -344,7 +345,14 @@ int pim_channel_add_oif(struct channel_oil *channel_oil, struct interface *oif, by both source and receiver attached to the same interface. See TODO T22. */ - if (pim_ifp->mroute_vif_index == channel_oil->oil.mfcc_parent) { + if (channel_oil->up && + PIM_UPSTREAM_FLAG_TEST_ALLOW_IIF_IN_OIL( + channel_oil->up->flags)) { + allow_iif_in_oil = true; + } + + if (!allow_iif_in_oil && + pim_ifp->mroute_vif_index == channel_oil->oil.mfcc_parent) { channel_oil->oil_inherited_rescan = 1; if (PIM_DEBUG_MROUTE) { char group_str[INET_ADDRSTRLEN]; |