Skip to content

Commit

Permalink
Make dummy rules pass icmp validation
Browse files Browse the repository at this point in the history
New icmp validation is more strict. This commit updates dummy rules so
they pass validation.
  • Loading branch information
ozdanborne committed Mar 1, 2018
1 parent 2f3212c commit b04fa29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
3 changes: 0 additions & 3 deletions test-data/v1/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
ingress:
- action: allow
protocol: udp
icmp:
type: 10
code: 100
source:
tag: web
net: 1.2.3.4/10
Expand Down
3 changes: 3 additions & 0 deletions tests/st/calicoctl/test_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,7 @@ class InvalidData(TestBase):
'ICMP': {'type': 256, # max value 255
'code': 255},
'action': 'Deny',
'protocol': 'ICMP',
'destination': {},
'source': {}}],
}
Expand All @@ -1882,6 +1883,7 @@ class InvalidData(TestBase):
'ICMP': {'type': 19,
'code': 256}, # max value 255
'action': 'Deny',
'protocol': 'ICMP',
'destination': {},
'source': {}}],
}
Expand Down Expand Up @@ -1912,6 +1914,7 @@ class InvalidData(TestBase):
'ICMP': {'type': 256, # 1-byte field
'code': 255},
'action': 'Deny',
'protocol': 'ICMP',
'destination': {},
'source': {}}],
},
Expand Down
6 changes: 0 additions & 6 deletions tests/st/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
],
'ingress': [
{
'notICMP': {'type': 19, 'code': 255},
'ipVersion': 4,
'action': 'Deny',
'destination': {
Expand All @@ -143,7 +142,6 @@
'ports': ['100:200'],
'selector': "type=='application'",
},
'icmp': {'type': 10, 'code': 6},
'protocol': 'TCP',
'source': {
'notNets': ['10.1.0.0/16'],
Expand Down Expand Up @@ -260,7 +258,6 @@
],
'ingress': [
{
'notICMP': {'type': 19, 'code': 255},
'ipVersion': 4,
'action': 'Deny',
'destination': {
Expand All @@ -271,7 +268,6 @@
'ports': ['100:200'],
'selector': "type=='application'",
},
'icmp': {'type': 10, 'code': 6},
'protocol': 'TCP',
'source': {
'notNets': ['10.1.0.0/16'],
Expand Down Expand Up @@ -426,7 +422,6 @@
],
'ingress': [
{
'notICMP': {'type': 19, 'code': 255},
'ipVersion': 4,
'action': 'Deny',
'destination': {
Expand All @@ -436,7 +431,6 @@
'nets': ['10.2.0.0/16'],
'ports': ['100:200'],
'selector': "type=='application'"},
'icmp': {'type': 10, 'code': 6},
'protocol': 'TCP',
'source': {
'notNets': ['10.1.0.0/16'],
Expand Down

0 comments on commit b04fa29

Please sign in to comment.