summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-10 21:11:20 +0200
committerGitHub <noreply@github.com>2023-05-10 21:11:20 +0200
commitb469ed55403b25738949216f6f07ae9e70595db1 (patch)
treefa0b81909dfa7fd9b983b5a356b06f2cd613b626
parent70e476760a9c5b42a5d3f8647e3b4ac361472871 (diff)
parent3c2a206e733cd86f3b6a9c58b74e20c679170424 (diff)
downloadvyos-1x-b469ed55403b25738949216f6f07ae9e70595db1.tar.gz
vyos-1x-b469ed55403b25738949216f6f07ae9e70595db1.zip
Merge pull request #1992 from sever-sever/T5217
T5217: Add smoketest for CONFIG_NFT_SYNPROXY kernel option
-rwxr-xr-xsmoketest/scripts/system/test_kernel_options.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/smoketest/scripts/system/test_kernel_options.py b/smoketest/scripts/system/test_kernel_options.py
index 94be0483a..fe2a1c48a 100755
--- a/smoketest/scripts/system/test_kernel_options.py
+++ b/smoketest/scripts/system/test_kernel_options.py
@@ -63,6 +63,19 @@ class TestKernelModules(unittest.TestCase):
self.assertIn(option, config_data,
f"Option {option} is not present in /proc/config.gz")
+ def test_synproxy_enabled(self):
+ options_to_check = [
+ 'CONFIG_NFT_SYNPROXY',
+ 'CONFIG_IP_NF_TARGET_SYNPROXY'
+ ]
+ if not os.path.isfile(CONFIG):
+ call('sudo modprobe configs')
+ with gzip.open(CONFIG, 'rt') as f:
+ config_data = f.read()
+ for option in options_to_check:
+ tmp = re.findall(f'{option}=(y|m)', config_data)
+ self.assertTrue(tmp)
+
def test_qemu_support(self):
# The bond/lacp interface must be enabled in the OS Kernel
for option in ['CONFIG_VIRTIO_BLK', 'CONFIG_SCSI_VIRTIO',