summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-01 21:50:36 +0200
committerChristian Breunig <christian@breunig.cc>2024-04-01 21:53:56 +0200
commit462ba67cf2e193883e33b4ce655b2b0cd1aab80f (patch)
treee81cd46d9817880cc6bbb246d1f7ce041cffd727 /src/conf_mode
parentf92ef7f3c86ca09775b536ca2bd9813f95cc7d3f (diff)
downloadvyos-1x-462ba67cf2e193883e33b4ce655b2b0cd1aab80f.tar.gz
vyos-1x-462ba67cf2e193883e33b4ce655b2b0cd1aab80f.zip
conntrack: T4309: T4903: always use full nft command name (e.g. --file over -f)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system_conntrack.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/conf_mode/system_conntrack.py b/src/conf_mode/system_conntrack.py
index 3d42389f6..031fe63b0 100755
--- a/src/conf_mode/system_conntrack.py
+++ b/src/conf_mode/system_conntrack.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2021-2023 VyOS maintainers and contributors
+# Copyright (C) 2021-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -15,19 +15,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
-import re
from sys import exit
from vyos.config import Config
from vyos.configdep import set_dependents, call_dependents
-from vyos.utils.process import process_named_running
from vyos.utils.dict import dict_search
from vyos.utils.dict import dict_search_args
from vyos.utils.dict import dict_search_recursive
from vyos.utils.process import cmd
from vyos.utils.process import rc_cmd
-from vyos.utils.process import run
from vyos.template import render
from vyos import ConfigError
from vyos import airbag
@@ -223,7 +220,7 @@ def apply(conntrack):
cmd(f'modprobe -a {module_str}')
# Load new nftables ruleset
- install_result, output = rc_cmd(f'nft -f {nftables_ct_file}')
+ install_result, output = rc_cmd(f'nft --file {nftables_ct_file}')
if install_result == 1:
raise ConfigError(f'Failed to apply configuration: {output}')