Merge pull request #8060 from donaldsharp/ospf_vrf_baloney

ospfd:  Prevent duplicate packet read in certain vrf situations
This commit is contained in:
Mark Stapp 2021-02-11 11:58:15 -05:00 committed by GitHub
commit f43e9ec02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2987,6 +2987,16 @@ static enum ospf_read_return_enum ospf_read_helper(struct ospf *ospf)
}
}
if (ospf->vrf_id == VRF_DEFAULT && ospf->vrf_id != ifp->vrf_id) {
/*
* We may have a situation where l3mdev_accept == 1
* let's just kindly drop the packet and move on.
* ospf really really really does not like when
* we receive the same packet multiple times.
*/
return OSPF_READ_CONTINUE;
}
/* Self-originated packet should be discarded silently. */
if (ospf_if_lookup_by_local_addr(ospf, NULL, iph->ip_src)) {
if (IS_DEBUG_OSPF_PACKET(0, RECV)) {