From c4b4c242ec8cfcdb23f0f90faaa0ff76577e1364 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 25 Jul 2024 07:50:32 -0400 Subject: [PATCH] pimd: Fix msdp setting of sa->rp The code is clearly incorrect. After consultation with the original author this is the decided change. Signed-off-by: Donald Sharp --- pimd/pim_msdp.c | 8 +++----- tests/topotests/msdp_topo1/test_msdp_topo1.py | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 623c14bb0391..ea8c84cca556 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", }