Merge pull request #8925 from idryzhov/ospf6-duplicated-read

ospf6d: fix duplicated packet read
This commit is contained in:
Donald Sharp 2021-06-28 07:44:33 -04:00 committed by GitHub
commit d57b090fcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1709,6 +1709,13 @@ static int ospf6_read_helper(int sockfd, struct ospf6 *ospf6)
return OSPF6_READ_CONTINUE; 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; oh = (struct ospf6_header *)recvbuf;
if (ospf6_rxpacket_examin(oi, oh, len) != MSG_OK) if (ospf6_rxpacket_examin(oi, oh, len) != MSG_OK)
return OSPF6_READ_CONTINUE; return OSPF6_READ_CONTINUE;