diff options
| author | metricsmancer <metricsmancer@gmail.com> | 2026-03-20 07:54:43 +0100 |
|---|---|---|
| committer | metricsmancer <metricsmancer@gmail.com> | 2026-03-20 08:32:13 +0100 |
| commit | eba3bd71fe39aa91177d50eb5d18ca7706c26bc7 (patch) | |
| tree | 59d39cc6e46bbbd7e2fa9f727fbd5a4512b1e28d /python | |
| parent | fc06cc45148a42171baf9f4ae01da33c3f0df1aa (diff) | |
| download | vyos-1x-eba3bd71fe39aa91177d50eb5d18ca7706c26bc7.tar.gz vyos-1x-eba3bd71fe39aa91177d50eb5d18ca7706c26bc7.zip | |
T8404: fix TypeError when ipv6 address node exists without autoconf
dict_search('ipv6.address', config) returns None when the ipv6 address
node is empty (e.g. after deleting autoconf), causing a TypeError on
the 'in' membership test. Use dict_search('ipv6.address.autoconf', config)
instead, which safely returns None for any missing path segment.
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/ifconfig/pppoe.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/pppoe.py b/python/vyos/ifconfig/pppoe.py index c20c6efaa..2a89cbddd 100644 --- a/python/vyos/ifconfig/pppoe.py +++ b/python/vyos/ifconfig/pppoe.py @@ -142,5 +142,5 @@ class PPPoEIf(Interface): self._cmd(f'vtysh -c "conf t" {vrf} -c "ipv6 route ::/0 {self.ifname} tag 210 {distance}"') # kick RS when IPv6 is up. - if 'autoconf' in dict_search('ipv6.address', config): + if dict_search('ipv6.address.autoconf', config) is not None: self._cmd(f'rdisc6 --single --retry 3 {self.ifname}') |
