summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-29 01:09:06 +0200
committerGitHub <noreply@github.com>2024-07-29 01:09:06 +0200
commitcd56721e7a74ea65457e6f825619dc2ccf91f9ab (patch)
tree6a492a305f3f4ac4e4948f23ee8139e1f7ca34cb /src/conf_mode
parent023b70d98889570d628684ac123c8dee34edb609 (diff)
parent27641f07b28df3e32333aa2e6d07222411b8c8bc (diff)
downloadvyos-1x-cd56721e7a74ea65457e6f825619dc2ccf91f9ab.tar.gz
vyos-1x-cd56721e7a74ea65457e6f825619dc2ccf91f9ab.zip
Merge pull request #3862 from vyos/mergify/bp/sagitta/pr-3853
system_option: T5552: Apply IPv4 and IPv6 options after reapplying sysctls by TuneD (backport #3853)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system_option.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py
index 571ce55ec..180686924 100755
--- a/src/conf_mode/system_option.py
+++ b/src/conf_mode/system_option.py
@@ -31,6 +31,7 @@ from vyos.utils.process import cmd
from vyos.utils.process import is_systemd_service_running
from vyos.utils.network import is_addr_assigned
from vyos.utils.network import is_intf_addr_assigned
+from vyos.configdep import set_dependents, call_dependents
from vyos import ConfigError
from vyos import airbag
airbag.enable()
@@ -55,6 +56,12 @@ def get_config(config=None):
get_first_key=True,
with_recursive_defaults=True)
+ if 'performance' in options:
+ # Update IPv4 and IPv6 options after TuneD reapplies
+ # sysctl from config files
+ for protocol in ['ip', 'ipv6']:
+ set_dependents(protocol, conf)
+
return options
def verify(options):
@@ -145,6 +152,8 @@ def apply(options):
else:
cmd('systemctl stop tuned.service')
+ call_dependents()
+
# Keyboard layout - there will be always the default key inside the dict
# but we check for key existence anyway
if 'keyboard_layout' in options: