Fix DNS resolver issue

This commit is contained in:
Pearl Dsilva 2024-05-20 17:40:13 -04:00 committed by nvazquez
parent fe81ae0af3
commit b09c11f447
No known key found for this signature in database
GPG Key ID: 656E1BCC8CB54F84
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ 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)
dns_list.insert(0, ip)
if gn.data['router_guest_ip'] != ip:
dns_list.insert(0, ip)
elif self.config.is_dhcp() and not self.config.use_extdns():
guest_ip = self.config.address().get_guest_ip()
if guest_ip and guest_ip in dns_list and ip not in dns_list: