diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-02-11 11:58:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-11 11:58:15 -0500 |
| commit | f43e9ec02fab4624a39a4ff48257c43d5dc0904b (patch) | |
| tree | 5ea61d457888e1b1192d21e8a85206f78154d0b7 /ospfd/ospf_packet.c | |
| parent | de6223a98d7cd3a38a19f0c97a8692d6ea5e17bc (diff) | |
| parent | 555691e96e90b69fe743bf8b23a5810a0894d34c (diff) | |
Merge pull request #8060 from donaldsharp/ospf_vrf_baloney
ospfd: Prevent duplicate packet read in certain vrf situations
Diffstat (limited to 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index ef39b6c2f6..343e406f28 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -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)) { |
