mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 13:30:01 +00:00
Merge pull request #12245 from mobash-rasool/fixes3
pimd: fix igmp source packet check
This commit is contained in:
commit
70f29b9f7b
@ -634,7 +634,7 @@ static int process_igmp_packet(struct pim_instance *pim, const char *buf,
|
|||||||
|
|
||||||
connected_src = pim_if_connected_to_source(ifp, ip_hdr->ip_src);
|
connected_src = pim_if_connected_to_source(ifp, ip_hdr->ip_src);
|
||||||
|
|
||||||
if (!connected_src) {
|
if (!connected_src && !pim_addr_is_any(ip_hdr->ip_src)) {
|
||||||
if (PIM_DEBUG_GM_PACKETS) {
|
if (PIM_DEBUG_GM_PACKETS) {
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Recv IGMP packet on interface: %s from a non-connected source: %pI4",
|
"Recv IGMP packet on interface: %s from a non-connected source: %pI4",
|
||||||
@ -644,7 +644,8 @@ static int process_igmp_packet(struct pim_instance *pim, const char *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pim_ifp = ifp->info;
|
pim_ifp = ifp->info;
|
||||||
ifaddr = connected_src->u.prefix4;
|
ifaddr = connected_src ? connected_src->u.prefix4
|
||||||
|
: pim_ifp->primary_address;
|
||||||
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->gm_socket_list, ifaddr);
|
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->gm_socket_list, ifaddr);
|
||||||
|
|
||||||
if (PIM_DEBUG_GM_PACKETS) {
|
if (PIM_DEBUG_GM_PACKETS) {
|
||||||
@ -655,11 +656,11 @@ static int process_igmp_packet(struct pim_instance *pim, const char *buf,
|
|||||||
}
|
}
|
||||||
if (igmp)
|
if (igmp)
|
||||||
pim_igmp_packet(igmp, (char *)buf, buf_size);
|
pim_igmp_packet(igmp, (char *)buf, buf_size);
|
||||||
else if (PIM_DEBUG_GM_PACKETS) {
|
else if (PIM_DEBUG_GM_PACKETS)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"No IGMP socket on interface: %s with connected source: %pFX",
|
"No IGMP socket on interface: %s with connected source: %pI4",
|
||||||
ifp->name, connected_src);
|
ifp->name, &ifaddr);
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user