diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-25 13:59:28 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-26 11:57:26 +0200 |
commit | 709bd204214c9d31592e4c2ccbb78b6b3f79a99b (patch) | |
tree | 1bb3a367f659d6ce9d80308fc3b05c5c8d903d9b /ospf6d/ospf6_message.c | |
parent | Merge pull request #8904 from rameshabhinay/ospf6_show (diff) | |
download | frr-709bd204214c9d31592e4c2ccbb78b6b3f79a99b.tar.xz frr-709bd204214c9d31592e4c2ccbb78b6b3f79a99b.zip |
ospf6d: fix duplicated packet read
When OSPFv3 router is configured in both default and non-default VRFs,
every packet destined to a non-default VRF is read twice. This makes it
impossible to establish neighborship because every DbDesc packet is
treated as duplicated and we end up infinitely exchanging DbDescs.
We should drop packets received in the default VRF if an interface we
received it on is bound to another VRF.
Same thing was done for OSPFv2 in 555691e.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to '')
-rw-r--r-- | ospf6d/ospf6_message.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 5f23aab80..817e5372e 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -1709,6 +1709,13 @@ static int ospf6_read_helper(int sockfd, struct ospf6 *ospf6) return OSPF6_READ_CONTINUE; } + /* + * Drop packet destined to another VRF. + * This happens when raw_l3mdev_accept is set to 1. + */ + if (ospf6->vrf_id != oi->interface->vrf_id) + return OSPF6_READ_CONTINUE; + oh = (struct ospf6_header *)recvbuf; if (ospf6_rxpacket_examin(oi, oh, len) != MSG_OK) return OSPF6_READ_CONTINUE; |