From 4c69f89c682b240ea8cf33352b17b4200178869c Mon Sep 17 00:00:00 2001 From: Ashley Dumaine Date: Thu, 29 Aug 2024 17:10:08 -0400 Subject: [PATCH] use protocol set by the rule --- controller/linodefirewall_controller_helpers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controller/linodefirewall_controller_helpers.go b/controller/linodefirewall_controller_helpers.go index 1a18adb8c..928548b3c 100644 --- a/controller/linodefirewall_controller_helpers.go +++ b/controller/linodefirewall_controller_helpers.go @@ -178,7 +178,7 @@ func processACL(firewall *infrav1alpha2.LinodeFirewall) ( Action: rule.Action, Label: ruleLabel, Description: fmt.Sprintf("Rule %d, Created by CAPL: %s", i, rule.Label), - Protocol: linodego.TCP, + Protocol: rule.Protocol, Ports: rule.Ports, Addresses: linodego.NetworkAddresses{IPv4: &v4chunk}, }) @@ -193,7 +193,7 @@ func processACL(firewall *infrav1alpha2.LinodeFirewall) ( Action: rule.Action, Label: ruleLabel, Description: fmt.Sprintf("Rule %d, Created by CAPL: %s", i, rule.Label), - Protocol: linodego.TCP, + Protocol: rule.Protocol, Ports: rule.Ports, Addresses: linodego.NetworkAddresses{IPv6: &v6chunk}, }) @@ -232,7 +232,7 @@ func processACL(firewall *infrav1alpha2.LinodeFirewall) ( Action: rule.Action, Label: ruleLabel, Description: fmt.Sprintf("Rule %d, Created by CAPL: %s", i, rule.Label), - Protocol: linodego.TCP, + Protocol: rule.Protocol, Ports: rule.Ports, Addresses: linodego.NetworkAddresses{IPv4: &v4chunk}, }) @@ -247,7 +247,7 @@ func processACL(firewall *infrav1alpha2.LinodeFirewall) ( Action: rule.Action, Label: ruleLabel, Description: fmt.Sprintf("Rule %d, Created by CAPL: %s", i, rule.Label), - Protocol: linodego.TCP, + Protocol: rule.Protocol, Ports: rule.Ports, Addresses: linodego.NetworkAddresses{IPv6: &v6chunk}, })