mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-16 23:52:06 +08:00
modem: fall back when cellular DNS is missing (#38213)
* modem: fall back when cellular DNS is missing * rm test * comment --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
@@ -505,7 +505,11 @@ class Modem:
|
||||
except (AddressValueError, ValueError):
|
||||
pass
|
||||
if not dns_servers:
|
||||
logging.warning(f"no cellular DNS servers reported by modem: {v!r}")
|
||||
dns_servers = [
|
||||
"8.8.8.8", # Google
|
||||
"1.1.1.1", # Cloudflare
|
||||
]
|
||||
logging.warning(f"no cellular DNS servers reported by modem: {v!r}; using fallback {dns_servers}")
|
||||
return dns_servers
|
||||
|
||||
def _poll_byte_counters(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user