Fix prefix length comparison bug in AutoApprovers route evaluation (#862)

This commit is contained in:
Benjamin Roberts 2022-11-01 22:00:40 +11:00 committed by GitHub
parent 0cf9c4ce8e
commit 8a07381e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -1132,7 +1132,8 @@ func (s *Suite) TestAutoApproveRoutes(c *check.C) {
defaultRoute := netip.MustParsePrefix("0.0.0.0/0")
route1 := netip.MustParsePrefix("10.10.0.0/16")
route2 := netip.MustParsePrefix("10.11.0.0/16")
// Check if a subprefix of an autoapproved route is approved
route2 := netip.MustParsePrefix("10.11.0.0/24")
machine := Machine{
ID: 0,