summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorBrent Eagles <beagles@redhat.com>2016-11-23 18:59:58 -0330
committerBrent Eagles <beagles@redhat.com>2016-11-24 08:54:48 -0330
commit688a79c6c68422c0f873074370b1bbc87c6d1007 (patch)
tree1925f5a262adab08fddfacfe4e1eee7588c96d82 /manifests
parent92f9c952d6cbb0c11c8457de0e49748f3adf667e (diff)
Do not configure state matching when using GRE
The firewall rule quite reasonably sets up a default state matching rule but this is invalid for GRE. This patch conditionally adds the state matching if the protocol is not GRE. Closes-Bug: #1644360 Change-Id: Ie4ca41d0f36e79ba6822c358e21b827105736dd7
Diffstat (limited to 'manifests')
-rw-r--r--manifests/firewall/rule.pp11
1 files changed, 9 insertions, 2 deletions
diff --git a/manifests/firewall/rule.pp b/manifests/firewall/rule.pp
index c63162b..6801dc4 100644
--- a/manifests/firewall/rule.pp
+++ b/manifests/firewall/rule.pp
@@ -83,14 +83,21 @@ define tripleo::firewall::rule (
'sport' => $sport,
'proto' => $proto,
'action' => $action,
- 'state' => $state,
'source' => $source,
'iniface' => $iniface,
'chain' => $chain,
'destination' => $destination,
}
+ if $proto != 'gre' {
+ $state_rule = {
+ 'state' => $state
+ }
+ } else {
+ $state_rule = {}
+ }
+
- $rule = merge($basic, $extras)
+ $rule = merge($basic, $state_rule, $extras)
validate_hash($rule)
create_resources('firewall', { "${title}" => $rule })