From 3328081cceffc383925b4da2d5ee0323657df149 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 7 Nov 2026 22:13:43 +0100 Subject: 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. --- python/vyos/ifconfig/wwan.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'python') 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 -- cgit v1.2.3