forked from Mirror/frr
pimd: prevent LHR from register forwarding packets for non-FHR sources
SPT switchover handling is done by adding pimreg in the OIL of the (*, G) entry on the LHR. This causes multicast data with that destination to be sent to pimd as IGMPMSG_WHOLEPKT. These packets trigger creation of (S,G) and also register forwarding. However register forwarding must only be done if the router is also a FHR. That FHR check was missing causing strange source registrations from multicast routers that were not directly connected to the source. Relevant logs from LHR - PIM: pim_mroute_msg: pim kernel upcall WHOLEPKT type=3 ip_p=0 from fd=9 for (S,G)=(6.0.0.30,239.1.1.111) on pimreg vifi=0 size=98 PIM: Sending (6.0.0.30,239.1.1.111) Register Packet to 81.0.0.5 PIM: pim_register_send: Sending (6.0.0.30,239.1.1.111) Register Packet to 81.0.0.5 on swp2 And 6.0.0.30 is clearly not directly connected on that router - root@tor-11:~# ip route |grep 6.0.0.30 -A2 6.0.0.30 proto ospf metric 20 nexthop via 6.0.0.22 dev swp1 weight 1 onlink nexthop via 6.0.0.23 dev swp2 weight 1 onlink root@tor-11:~# Ticket: CM-24549 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
a04f8890d1
commit
2bc31c4422
|
@ -323,6 +323,15 @@ static int pim_mroute_msg_wholepkt(int fd, struct interface *ifp,
|
|||
pim_str_sg_dump(&sg));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags)) {
|
||||
if (PIM_DEBUG_PIM_REG)
|
||||
zlog_debug(
|
||||
"%s register forward skipped, not FHR",
|
||||
up->sg_str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
pim_register_send((uint8_t *)buf + sizeof(struct ip),
|
||||
ntohs(ip_hdr->ip_len) - sizeof(struct ip),
|
||||
pim_ifp->primary_address, rpg, 0, up);
|
||||
|
|
Loading…
Reference in a new issue