Skip to content

Commit 40e1304

Browse files
committed
fix: cidr remap fix
1 parent 70ae312 commit 40e1304

File tree

1 file changed

+4
-4
lines changed
  • pkg/liqo-controller-manager/networking/external-network/remapping

1 file changed

+4
-4
lines changed

pkg/liqo-controller-manager/networking/external-network/remapping/cidr.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ func forgeCIDRFirewallConfigurationDNATRules(cfg *networkingv1beta1.Configuratio
179179

180180
func forgeCIDRFirewallConfigurationSNATRules(cfg *networkingv1beta1.Configuration,
181181
opts *Options, cidrtype CIDRType) []firewall.NatRule {
182-
var localCIDR, remoteRemapCIDR string
182+
var remoteCIDR, remoteRemapCIDR string
183183
switch cidrtype {
184184
case PodCIDR:
185-
localCIDR = cidrutils.GetPrimary(cfg.Spec.Local.CIDR.Pod).String()
185+
remoteCIDR = cidrutils.GetPrimary(cfg.Spec.Remote.CIDR.Pod).String()
186186
remoteRemapCIDR = cidrutils.GetPrimary(cfg.Status.Remote.CIDR.Pod).String()
187187
case ExternalCIDR:
188-
localCIDR = cidrutils.GetPrimary(cfg.Spec.Local.CIDR.External).String()
188+
remoteCIDR = cidrutils.GetPrimary(cfg.Spec.Remote.CIDR.External).String()
189189
remoteRemapCIDR = cidrutils.GetPrimary(cfg.Status.Remote.CIDR.External).String()
190190
}
191191

@@ -204,7 +204,7 @@ func forgeCIDRFirewallConfigurationSNATRules(cfg *networkingv1beta1.Configuratio
204204
{
205205
Op: firewall.MatchOperationEq,
206206
IP: &firewall.MatchIP{
207-
Value: localCIDR,
207+
Value: remoteCIDR,
208208
Position: firewall.MatchPositionSrc,
209209
},
210210
},

0 commit comments

Comments
 (0)