diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 04b4d296ddbc..3393cebdd2df 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -411,12 +411,10 @@ void pim_msdp_sa_ref(struct pim_instance *pim, struct pim_msdp_peer *mp, pim_addr_to_prefix(&grp, sa->sg.grp); rp_info = pim_rp_find_match_group(pim, &grp); if (rp_info) { - sa->rp = rp_info->rp.rpf_addr; - } else - { - sa->rp = pim->msdp.originator_id; + sa->rp = rp_info->rp.rpf_addr; + } else { + sa->rp = pim->msdp.originator_id; } - sa->rp = pim->msdp.originator_id; pim_msdp_pkt_sa_tx_one(sa); } sa->flags &= ~PIM_MSDP_SAF_STALE; diff --git a/tests/topotests/msdp_topo1/test_msdp_topo1.py b/tests/topotests/msdp_topo1/test_msdp_topo1.py index 08c37617cf76..4b54ef29ffc4 100755 --- a/tests/topotests/msdp_topo1/test_msdp_topo1.py +++ b/tests/topotests/msdp_topo1/test_msdp_topo1.py @@ -359,7 +359,7 @@ def test_msdp(): "192.168.10.100": { "source": "192.168.10.100", "group": "229.1.2.3", - "rp": "192.168.1.1", + "rp": "10.254.254.1", "local": "no", "sptSetup": "no", } @@ -394,7 +394,7 @@ def test_msdp(): "192.168.10.100": { "source": "192.168.10.100", "group": "229.1.2.3", - "rp": "192.168.1.1", + "rp": "10.254.254.1", "local": "no", "sptSetup": "yes", }