summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-04-18 07:50:56 -0500
committerGitHub <noreply@github.com>2024-04-18 07:50:56 -0500
commite8f93864cf727fef9fc16d50ef79419a5955b656 (patch)
treeda5e11e84f48278a1b09e626c36ba7292b7d7971 /src
parent85f055ba5d76046c383739ee9a887a0cf5e7155c (diff)
parentbbe0821213b7df26aa19915a6ea631d27cb1f98f (diff)
downloadvyos-1x-e8f93864cf727fef9fc16d50ef79419a5955b656.tar.gz
vyos-1x-e8f93864cf727fef9fc16d50ef79419a5955b656.zip
Merge pull request #3328 from vyos/mergify/bp/sagitta/pr-3327
pki: T6241: do not call dependency before its initialization (backport #3327)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/pki.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/conf_mode/pki.py b/src/conf_mode/pki.py
index 6228ff0d2..8deec0e85 100755
--- a/src/conf_mode/pki.py
+++ b/src/conf_mode/pki.py
@@ -25,6 +25,7 @@ from vyos.configdep import set_dependents
from vyos.configdep import call_dependents
from vyos.configdict import node_changed
from vyos.configdiff import Diff
+from vyos.configdiff import get_config_diff
from vyos.defaults import directories
from vyos.pki import is_ca_certificate
from vyos.pki import load_certificate
@@ -199,6 +200,7 @@ def get_config(config=None):
pki['system'] = conf.get_config_dict([], key_mangling=('-', '_'),
get_first_key=True,
no_tag_node_value_mangle=True)
+ D = get_config_diff(conf)
for search in sync_search:
for key in search['keys']:
@@ -230,9 +232,11 @@ def get_config(config=None):
if path[0] == 'interfaces':
ifname = found_path[0]
- set_dependents(path[1], conf, ifname)
+ if not D.node_changed_presence(path + [ifname]):
+ set_dependents(path[1], conf, ifname)
else:
- set_dependents(path[1], conf)
+ if not D.node_changed_presence(path):
+ set_dependents(path[1], conf)
return pki