maas/images/maas-region-controller-focal/3.0_route.patch
Ruslan Aliev 003f7bf702 MAAS region & rack controller upgrade v3.0.0
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I87a86c920e49e53447c87bcff3c0fae08ebf267f
2023-03-13 02:20:28 -05:00

14 lines
645 B
Diff

diff --git a/src/maasserver/preseed_network.py b/src/maasserver/preseed_network.py
index 3851424fc..8bfa90e7d 100644
--- a/src/maasserver/preseed_network.py
+++ b/src/maasserver/preseed_network.py
@@ -309,7 +309,7 @@ class InterfaceConfiguration:
def _get_matching_routes(self, source):
"""Return all route objects matching `source`."""
- return {route for route in self.routes if route.source == source}
+ return {route for route in self.routes if str(route.source.cidr) == str(source.cidr)}
def _generate_addresses(self, version=1):
"""Generate the various addresses needed for this interface."""