summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_nhrp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-31 19:34:26 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-31 19:34:26 +0100
commit0091f6080181cc3836d70589d9a2f4a1c1cb11a8 (patch)
tree7ca1dbc816a2901b11d55c84c967592ed254aa0f /smoketest/scripts/cli/test_protocols_nhrp.py
parentc5f118b3af482813a45c327ece29b5b41fd1ad9c (diff)
parent28b285b4791aece18fe1bbd76f3d555370545006 (diff)
downloadvyos-1x-0091f6080181cc3836d70589d9a2f4a1c1cb11a8.tar.gz
vyos-1x-0091f6080181cc3836d70589d9a2f4a1c1cb11a8.zip
Merge branch 'firewall' of https://github.com/sarthurdev/vyos-1x into current
* 'firewall' of https://github.com/sarthurdev/vyos-1x: zone_policy: T3873: Implement intra-zone-filtering policy: T2199: Migrate policy route op-mode to XML/Python policy: T2199: Migrate policy route to XML/Python zone-policy: T2199: Migrate zone-policy op-mode to XML/Python zone-policy: T2199: Migrate zone-policy to XML/Python firewall: T2199: Migrate firewall op-mode to XML/Python firewall: T2199: Migrate firewall to XML/Python
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_nhrp.py')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_nhrp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_nhrp.py b/smoketest/scripts/cli/test_protocols_nhrp.py
index aa0ac268d..40b19fec7 100755
--- a/smoketest/scripts/cli/test_protocols_nhrp.py
+++ b/smoketest/scripts/cli/test_protocols_nhrp.py
@@ -18,6 +18,7 @@ import unittest
from base_vyostest_shim import VyOSUnitTestSHIM
+from vyos.firewall import find_nftables_rule
from vyos.util import call, process_named_running, read_file
tunnel_path = ['interfaces', 'tunnel']
@@ -91,6 +92,14 @@ class TestProtocolsNHRP(VyOSUnitTestSHIM.TestCase):
for line in opennhrp_lines:
self.assertIn(line, tmp_opennhrp_conf)
+ firewall_matches = [
+ 'ip protocol gre',
+ 'ip saddr 192.0.2.1',
+ 'ip daddr 224.0.0.0/4',
+ 'comment "VYOS_NHRP_tun100"'
+ ]
+
+ self.assertTrue(find_nftables_rule('ip filter', 'VYOS_FW_OUTPUT', firewall_matches) is not None)
self.assertTrue(process_named_running('opennhrp'))
if __name__ == '__main__':