diff options
author | Adriano Marto Reis <adrianomarto@gmail.com> | 2020-07-10 00:56:24 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2020-10-06 14:11:24 +0200 |
commit | 9fbd9fc48f7c620dc505ba27319b86035d7dc142 (patch) | |
tree | 84b11ff4784c2ae8800f55a019d24c13a027f7d0 /pimd/pim_msdp.c | |
parent | Merge pull request #6904 from chiragshah6/yang_nb6 (diff) | |
download | frr-9fbd9fc48f7c620dc505ba27319b86035d7dc142.tar.xz frr-9fbd9fc48f7c620dc505ba27319b86035d7dc142.zip |
pimd: MSDP SA forwarding
* If the MSDP peer receives the SA from a non-RPF peer towards the
originating RP, it will drop the message.
* SA messages are forwarded away from the RP address only.
* SA messages are not forwarded within the mesh group.
* Preventing the MSDP connection from being dropped due to RPF check
failure (RFC3618, section 13 "MSDP Error Handling")
Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
Signed-off-by: Adriano Reis <areis@barrukka.local>
Diffstat (limited to 'pimd/pim_msdp.c')
-rw-r--r-- | pimd/pim_msdp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index b42092a46..7336cdfef 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -423,6 +423,7 @@ void pim_msdp_sa_ref(struct pim_instance *pim, struct pim_msdp_peer *mp, sa->sg_str); } /* send an immediate SA update to peers */ + sa->rp = pim->msdp.originator_id; pim_msdp_pkt_sa_tx_one(sa); } sa->flags &= ~PIM_MSDP_SAF_STALE; @@ -721,10 +722,18 @@ static int pim_msdp_sa_comp(const void *p1, const void *p2) /* XXX: this can use a bit of refining and extensions */ bool pim_msdp_peer_rpf_check(struct pim_msdp_peer *mp, struct in_addr rp) { + struct pim_nexthop nexthop; + if (mp->peer.s_addr == rp.s_addr) { return true; } + /* check if the MSDP peer is the nexthop for the RP */ + if (pim_nexthop_lookup(mp->pim, &nexthop, rp, 0) + && nexthop.mrib_nexthop_addr.u.prefix4.s_addr == mp->peer.s_addr) { + return true; + } + return false; } |