summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-03-21 20:55:30 +0100
committerGitHub <noreply@github.com>2023-03-21 20:55:30 +0100
commitb3629cc33ba8eeefa34c5ec3420d0f293fbb0325 (patch)
tree7d2771c568ed04699c9cba632337a0da3dad421a
parent306e422d8306f3e4c35779bf93177c1fb56a4b61 (diff)
parentc376ddedfc1a55dbf8a18ea2bdf6974a6fb665e8 (diff)
downloadvyos-1x-b3629cc33ba8eeefa34c5ec3420d0f293fbb0325.tar.gz
vyos-1x-b3629cc33ba8eeefa34c5ec3420d0f293fbb0325.zip
Merge pull request #1903 from bstepler/T5104
dhcp: pppoe: T5104: fix VRF comparisons
-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