summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-06-22 18:06:43 +0200
committerGitHub <noreply@github.com>2022-06-22 18:06:43 +0200
commit12aeb087c34fe4d5887a11301c2e32e4e1503436 (patch)
treea33704f472370dcbea751fd66cde1113ef48c142
parent69ad00f3e589a1d6d17ef02c884c0ba0d9cf6b66 (diff)
parent8c1f4802b48ac52ae737a47c136d603bc99ac7dd (diff)
downloadvyos-1x-12aeb087c34fe4d5887a11301c2e32e4e1503436.tar.gz
vyos-1x-12aeb087c34fe4d5887a11301c2e32e4e1503436.zip
Merge pull request #1367 from nicolas-fort/T4475
Policy: T4475: add support for matching ipv6 addresses on peer option…
-rw-r--r--interface-definitions/policy.xml.in5
-rwxr-xr-xsmoketest/scripts/cli/test_policy.py9
2 files changed, 14 insertions, 0 deletions
diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in
index a56514c9c..0d0ada591 100644
--- a/interface-definitions/policy.xml.in
+++ b/interface-definitions/policy.xml.in
@@ -961,8 +961,13 @@
<format>ipv4</format>
<description>Peer IP address</description>
</valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Peer IPv6 address</description>
+ </valueHelp>
<constraint>
<validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
</constraint>
</properties>
</leafNode>
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py
index d1531163f..3d37d22ae 100755
--- a/smoketest/scripts/cli/test_policy.py
+++ b/smoketest/scripts/cli/test_policy.py
@@ -715,6 +715,7 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
local_pref = '300'
metric = '50'
peer = '2.3.4.5'
+ peerv6 = '2001:db8::1'
tag = '6542'
goto = '25'
@@ -803,6 +804,14 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
'peer' : peer,
},
},
+
+ '31' : {
+ 'action' : 'permit',
+ 'match' : {
+ 'peer' : peerv6,
+ },
+ },
+
'40' : {
'action' : 'permit',
'match' : {