Fix DNS list on VR

This commit is contained in:
Nicolas Vazquez 2024-07-15 10:50:06 -03:00 committed by nvazquez
parent 8826d3792c
commit 84eca88a57
No known key found for this signature in database
GPG Key ID: 656E1BCC8CB54F84
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,9 @@ class CsDhcp(CsDataBag):
if (self.config.is_vpc() or self.config.is_router()) and ('is_vr_guest_gateway' in gn.data and gn.data['is_vr_guest_gateway']):
if gateway in dns_list:
dns_list.remove(gateway)
if gn.data['router_guest_ip'] != ip:
if gn.data['router_guest_ip'] != gn.data['router_guest_gateway']:
dns_list.insert(0, gn.data['router_guest_ip'])
else:
dns_list.insert(0, ip)
elif self.config.is_dhcp() and not self.config.use_extdns():
guest_ip = self.config.address().get_guest_ip()