summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-11-07 22:13:43 +0100
committerChristian Breunig <christian@breunig.cc>2026-11-07 22:19:52 +0100
commit3328081cceffc383925b4da2d5ee0323657df149 (patch)
tree4ecd28a1ef935a8576514e3f72403ae7f27ea915 /python
parentf8204635007a977141fc6a436fe2daf3e44f3084 (diff)
downloadvyos-1x-3328081cceffc383925b4da2d5ee0323657df149.tar.gz
vyos-1x-3328081cceffc383925b4da2d5ee0323657df149.zip
wwan: T9388: stop waiting for a bearer which cannot complete
The bearer settings of a family were polled for up to five seconds whenever they were missing. Without a connected bearer, or on a network that only supplies one family, they never arrive, so every such commit waited out the timeout once per configured family. Only wait while the connected bearer has no settings for either family yet.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/wwan.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/wwan.py b/python/vyos/ifconfig/wwan.py
index 4250d1472..dd2d96a5d 100644
--- a/python/vyos/ifconfig/wwan.py
+++ b/python/vyos/ifconfig/wwan.py
@@ -75,7 +75,16 @@ class WWANIf(Interface):
nonlocal bearer, method
bearer = self._get_active_bearer()
method = dict_search(f'bearer.{family}-config.method', bearer)
- return method not in (None, '', '--')
+ # No connected bearer, nothing it could still populate
+ if bearer is None:
+ return True
+ # ModemManager publishes both families when the bearer connects,
+ # so one being populated means the other is never coming
+ return any(
+ dict_search(f'bearer.{tmp}-config.method', bearer)
+ not in (None, '', '--')
+ for tmp in ('ipv4', 'ipv6')
+ )
wait_for(_ready, interval=0.5, timeout=5)
return bearer, method