mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 13:51:53 +00:00
pimd: Ensure packet received on vrf interface is configured for pim
In a vrf configuration, when we receive a pim packet we lookup the correct incoming interface. There exists a chance that the correct incoming interface has not been configured to use pim yet. gracefully bow out and do nothing with the packet. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
e0ae31b886
commit
a5b6bd2be3
@ -327,7 +327,13 @@ static int pim_sock_read(struct thread *t)
|
|||||||
* it's the right interface because we bind to it
|
* it's the right interface because we bind to it
|
||||||
*/
|
*/
|
||||||
ifp = if_lookup_by_index(ifindex, pim_ifp->pim->vrf_id);
|
ifp = if_lookup_by_index(ifindex, pim_ifp->pim->vrf_id);
|
||||||
|
if (!ifp->info) {
|
||||||
|
if (PIM_DEBUG_PIM_PACKETS)
|
||||||
|
zlog_debug(
|
||||||
|
"%s: Received incoming pim packet on interface not yet configured for pim %s",
|
||||||
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
int fail = pim_pim_packet(ifp, buf, len);
|
int fail = pim_pim_packet(ifp, buf, len);
|
||||||
if (fail) {
|
if (fail) {
|
||||||
if (PIM_DEBUG_PIM_PACKETS)
|
if (PIM_DEBUG_PIM_PACKETS)
|
||||||
|
Loading…
Reference in New Issue
Block a user