summaryrefslogtreecommitdiff
path: root/python/vyos/configdict.py
diff options
context:
space:
mode:
authorBrandon Stepler <brandon@stepler.net>2023-03-21 14:20:00 -0400
committerBrandon Stepler <brandon@stepler.net>2023-03-21 14:20:00 -0400
commitc376ddedfc1a55dbf8a18ea2bdf6974a6fb665e8 (patch)
treeef5058820062acd670d7e356cddf57837405b99d /python/vyos/configdict.py
parent1964fd7c75742abb668fba6a4e06cbf5803374da (diff)
downloadvyos-1x-c376ddedfc1a55dbf8a18ea2bdf6974a6fb665e8.tar.gz
vyos-1x-c376ddedfc1a55dbf8a18ea2bdf6974a6fb665e8.zip
dhcp: pppoe: T5104: fix VRF comparisons
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r--python/vyos/configdict.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 434ff99d7..6ab5c252c 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -333,8 +333,9 @@ def get_dhcp_interfaces(conf, vrf=None):
if dict_search('dhcp_options.default_route_distance', config) != None:
options.update({'dhcp_options' : config['dhcp_options']})
if 'vrf' in config:
- if vrf is config['vrf']: tmp.update({ifname : options})
- else: tmp.update({ifname : options})
+ if vrf == config['vrf']: tmp.update({ifname : options})
+ else:
+ if vrf is None: tmp.update({ifname : options})
return tmp
@@ -382,8 +383,9 @@ def get_pppoe_interfaces(conf, vrf=None):
if 'no_default_route' in ifconfig:
options.update({'no_default_route' : {}})
if 'vrf' in ifconfig:
- if vrf is ifconfig['vrf']: pppoe_interfaces.update({ifname : options})
- else: pppoe_interfaces.update({ifname : options})
+ if vrf == ifconfig['vrf']: pppoe_interfaces.update({ifname : options})
+ else:
+ if vrf is None: pppoe_interfaces.update({ifname : options})
return pppoe_interfaces