summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-07-25 07:50:32 -0400
committerDonald Sharp <sharpd@nvidia.com>2024-07-25 07:50:32 -0400
commitc4b4c242ec8cfcdb23f0f90faaa0ff76577e1364 (patch)
tree465143d30a5e1d3cd23e5bfc7fb49be8c4fd4937
parent5d43153c160bb7fae1adeb4b0eda6458fddb199a (diff)
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 <sharpd@nvidia.com>
-rw-r--r--pimd/pim_msdp.c8
-rwxr-xr-xtests/topotests/msdp_topo1/test_msdp_topo1.py4
2 files changed, 5 insertions, 7 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index 623c14bb03..ea8c84cca5 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 08c37617cf..4b54ef29ff 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",
}