Skip to content

Commit 3882815

Browse files
committed
pimd: compute inherited_olist before checking for (S,G,rpt) prune decision
Problem description: 1) In some corner cases in PIM, incorrect (S,G,rpt) prunes were sent causing traffic blackholing to downstream receivers. 2) The inherited_olist emptiness check was performed before the list was computed due to lazy population of channel_oil, causing it to incorrectly appear empty and prune is incorrectly propogated. Fix: Ensure inherited_olist is computed before checking for emptiness during (S,G,rpt) prune decision. Signed-off-by: harini <[email protected]>
1 parent 45ebe02 commit 3882815

10 files changed

Lines changed: 651 additions & 0 deletions

File tree

pimd/pim_ifchannel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,8 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
10391039
PIM_IF_FLAG_SET_S_G_RPT(ch->flags);
10401040

10411041
ch->ifjoin_state = PIM_IFJOIN_PRUNE_PENDING;
1042+
pim_upstream_inherited_olist_decide(pim_ifp->pim, ch->upstream);
1043+
10421044
if (listcount(pim_ifp->pim_neighbor_list) > 1)
10431045
jp_override_interval_msec =
10441046
pim_if_jp_override_interval_msec(ifp);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SPDX-License-Identifier: ISC
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
! -*- conf -*-
2+
!
3+
! Host11 Configuration (Source and Receiver host)
4+
! Note: host11 is NOT a PIM router - it just generates source traffic
5+
! and receives multicast via IGMP
6+
!
7+
interface lo
8+
ip address 10.0.0.5/32
9+
!
10+
interface host11-eth0
11+
ip address 10.0.14.5/24
12+
!
13+
interface host11-eth1
14+
ip address 10.0.18.5/24
15+
ip igmp
16+
!
17+
ip route 0.0.0.0/0 10.0.14.3
18+
!
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
! -*- conf -*-
2+
!
3+
! host_rp Router Configuration (source on RP pod - like hd31 in SSIM)
4+
!
5+
interface lo
6+
ip address 10.0.0.8/32
7+
!
8+
interface host_rp-eth0
9+
ip address 10.0.20.8/24
10+
!
11+
! Static route to reach multicast network
12+
ip route 0.0.0.0/0 10.0.20.1
13+
!
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
! -*- conf -*-
2+
!
3+
! RP Router Configuration
4+
!
5+
interface lo
6+
ip address 10.0.0.1/32
7+
!
8+
interface rp-eth0
9+
ip address 10.0.10.1/24
10+
ip pim
11+
!
12+
interface rp-eth1
13+
ip address 10.0.11.1/24
14+
ip pim
15+
!
16+
! Interface to host_rp (source on RP pod - like hd31 in SSIM)
17+
interface rp-eth2
18+
ip address 10.0.20.1/24
19+
ip pim
20+
ip igmp
21+
!
22+
router rip
23+
network 10.0.0.0/8
24+
redistribute connected
25+
!
26+
router pim
27+
rp 10.0.0.1
28+
join-prune-interval 60
29+
!
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
! -*- conf -*-
2+
!
3+
! Spine1 Router Configuration
4+
!
5+
interface lo
6+
ip address 10.0.0.2/32
7+
!
8+
interface spine1-eth0
9+
ip address 10.0.10.2/24
10+
ip pim
11+
!
12+
interface spine1-eth1
13+
ip address 10.0.12.2/24
14+
ip pim
15+
!
16+
interface spine1-eth2
17+
ip address 10.0.19.2/24
18+
ip pim
19+
!
20+
router rip
21+
network 10.0.0.0/8
22+
redistribute connected
23+
!
24+
router pim
25+
rp 10.0.0.1
26+
join-prune-interval 60
27+
!
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
! -*- conf -*-
2+
!
3+
! Spine2 Router Configuration
4+
!
5+
interface lo
6+
ip address 10.0.0.7/32
7+
!
8+
interface spine2-eth0
9+
ip address 10.0.11.7/24
10+
ip pim
11+
!
12+
interface spine2-eth1
13+
ip address 10.0.16.7/24
14+
ip pim
15+
!
16+
interface spine2-eth2
17+
ip address 10.0.17.7/24
18+
ip pim
19+
!
20+
! Access list to match source network
21+
access-list MATCH_SOURCE permit 10.0.14.0 0.0.0.255
22+
!
23+
router rip
24+
network 10.0.0.0/8
25+
redistribute connected
26+
! Make torc21 path less preferred for SOURCE routes
27+
offset-list MATCH_SOURCE in 5 spine2-eth2
28+
! Make RP path less preferred for SOURCE routes
29+
! spine2 should learn source routes from torc11 directly (spine2-eth1), not via RP
30+
offset-list MATCH_SOURCE in 5 spine2-eth0
31+
!
32+
router pim
33+
rp 10.0.0.1
34+
join-prune-interval 60
35+
!

0 commit comments

Comments
 (0)