summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-05-10 13:35:08 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-05-10 13:35:08 +0000
commit3c2a206e733cd86f3b6a9c58b74e20c679170424 (patch)
treefa0b81909dfa7fd9b983b5a356b06f2cd613b626
parent70e476760a9c5b42a5d3f8647e3b4ac361472871 (diff)
downloadvyos-1x-3c2a206e733cd86f3b6a9c58b74e20c679170424.tar.gz
vyos-1x-3c2a206e733cd86f3b6a9c58b74e20c679170424.zip
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',