From da29092d3d40a3b140fcb500bb8ae275cbf367fa Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 27 Aug 2021 19:44:04 +0200 Subject: vyos.ifconfig: pppoe: T3778: bugfix assignemnt of cached config We need to copy the configuration before this is done in super().update() as we utilize self.set_dhcpv6() before this is done by the base class. --- python/vyos/ifconfig/pppoe.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/vyos/ifconfig/pppoe.py b/python/vyos/ifconfig/pppoe.py index 9153863de..1d13264bf 100644 --- a/python/vyos/ifconfig/pppoe.py +++ b/python/vyos/ifconfig/pppoe.py @@ -75,6 +75,14 @@ class PPPoEIf(Interface): interface setup code and provide a single point of entry when workin on any interface. """ + # Cache the configuration - it will be reused inside e.g. DHCP handler + # XXX: maybe pass the option via __init__ in the future and rename this + # method to apply()? + # + # We need to copy this from super().update() as we utilize self.set_dhcpv6() + # before this is done by the base class. + self._config = config + # remove old routes from an e.g. old VRF assignment vrf = '' if 'vrf_old' in config: -- cgit v1.2.3