diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-10-18 17:32:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-18 17:32:23 +0200 |
| commit | a1df1f372a35d07058fbfab139a221f30668c772 (patch) | |
| tree | c825133a0b9c771b61a977b200cb4fe8e40b8f1a /python | |
| parent | db29bdc899e4b4c27569d3c5705839b924393fe6 (diff) | |
| parent | 22165e8624c12e826ec860d1720ccea31b5cc834 (diff) | |
| download | vyos-1x-a1df1f372a35d07058fbfab139a221f30668c772.tar.gz vyos-1x-a1df1f372a35d07058fbfab139a221f30668c772.zip | |
Merge pull request #5564 from yzguy/wwan-autoconf-ip-type
wwan: T9388: request an IPv6 bearer for autoconf without an address node
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/utils/wwan.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/python/vyos/utils/wwan.py b/python/vyos/utils/wwan.py index cf7d7b143..7b7c31d02 100644 --- a/python/vyos/utils/wwan.py +++ b/python/vyos/utils/wwan.py @@ -175,14 +175,14 @@ def connect_options(config: dict) -> str: context - both are key-mangled the same way, so both are accepted here. """ ip_type = 'ipv4' + address = config.get('address', []) slaac = dict_search('ipv6.address.autoconf', config) != None - if 'address' in config: - if 'dhcp' in config['address'] and ('dhcpv6' in config['address'] or slaac): - ip_type = 'ipv4v6' - elif 'dhcpv6' in config['address'] or slaac: - ip_type = 'ipv6' - elif 'dhcp' in config['address']: - ip_type = 'ipv4' + if 'dhcp' in address and ('dhcpv6' in address or slaac): + ip_type = 'ipv4v6' + elif 'dhcpv6' in address or slaac: + ip_type = 'ipv6' + elif 'dhcp' in address: + ip_type = 'ipv4' options = f'ip-type={ip_type},apn=' + config['apn'] if 'authentication' in config: |
