@@ -666,7 +666,7 @@ func getVPCLinodeInterfaceConfig(ctx context.Context, machineScope *scope.Machin
666666 VPC : & linodego.VPCInterfaceCreateOptions {
667667 SubnetID : subnetID ,
668668 IPv4 : & linodego.VPCInterfaceIPv4CreateOptions {
669- Addresses : []linodego.VPCInterfaceIPv4AddressCreateOptions {{
669+ Addresses : & []linodego.VPCInterfaceIPv4AddressCreateOptions {{
670670 Primary : ptr .To (true ),
671671 NAT1To1Address : ptr .To ("auto" ),
672672 Address : ptr .To ("auto" ),
@@ -751,7 +751,7 @@ func getVPCLinodeInterfaceConfigFromDirectID(ctx context.Context, machineScope *
751751 VPC : & linodego.VPCInterfaceCreateOptions {
752752 SubnetID : subnetID ,
753753 IPv4 : & linodego.VPCInterfaceIPv4CreateOptions {
754- Addresses : []linodego.VPCInterfaceIPv4AddressCreateOptions {{
754+ Addresses : & []linodego.VPCInterfaceIPv4AddressCreateOptions {{
755755 Primary : ptr .To (true ),
756756 NAT1To1Address : ptr .To ("auto" ),
757757 Address : ptr .To ("auto" ),
@@ -841,10 +841,7 @@ func isIPv6ConfigEmpty(opts *linodego.InstanceConfigInterfaceCreateOptionsIPv6)
841841}
842842
843843func isVPCInterfaceIPv6ConfigEmpty (opts * linodego.VPCInterfaceIPv6CreateOptions ) bool {
844- return opts == nil ||
845- len (opts .SLAAC ) == 0 &&
846- len (opts .Ranges ) == 0 &&
847- ! opts .IsPublic
844+ return opts == nil || (opts .SLAAC == nil && opts .Ranges == nil && opts .IsPublic == nil )
848845}
849846
850847// getMachineIPv6Config returns the IPv6 configuration for a LinodeMachine.
@@ -898,18 +895,18 @@ func getVPCLinodeInterfaceIPv6Config(machineScope *scope.MachineScope, numIPv6Ra
898895
899896 if machineScope .LinodeMachine .Spec .IPv6Options .IsPublicIPv6 != nil {
900897 // Set the public IPv6 flag based on the IsPublicIPv6 specification.
901- intfOpts .IsPublic = * machineScope .LinodeMachine .Spec .IPv6Options .IsPublicIPv6
898+ intfOpts .IsPublic = machineScope .LinodeMachine .Spec .IPv6Options .IsPublicIPv6
902899 }
903900
904901 if machineScope .LinodeMachine .Spec .IPv6Options .EnableSLAAC != nil && * machineScope .LinodeMachine .Spec .IPv6Options .EnableSLAAC {
905- intfOpts .SLAAC = []linodego.VPCInterfaceIPv6SLAACCreateOptions {
902+ intfOpts .SLAAC = & []linodego.VPCInterfaceIPv6SLAACCreateOptions {
906903 {
907904 Range : defaultNodeIPv6CIDRRange ,
908905 },
909906 }
910907 }
911908 if machineScope .LinodeMachine .Spec .IPv6Options .EnableRanges != nil && * machineScope .LinodeMachine .Spec .IPv6Options .EnableRanges {
912- intfOpts .Ranges = []linodego.VPCInterfaceIPv6RangeCreateOptions {
909+ intfOpts .Ranges = & []linodego.VPCInterfaceIPv6RangeCreateOptions {
913910 {
914911 Range : defaultNodeIPv6CIDRRange ,
915912 },
@@ -1009,13 +1006,13 @@ func constructLinodeInterfaceVPC(iface infrav1alpha2.LinodeInterfaceCreateOption
10091006 return & linodego.VPCInterfaceCreateOptions {
10101007 SubnetID : subnetID ,
10111008 IPv4 : & linodego.VPCInterfaceIPv4CreateOptions {
1012- Addresses : ipv4Addrs ,
1013- Ranges : ipv4Ranges ,
1009+ Addresses : & ipv4Addrs ,
1010+ Ranges : & ipv4Ranges ,
10141011 },
10151012 IPv6 : & linodego.VPCInterfaceIPv6CreateOptions {
1016- SLAAC : ipv6SLAAC ,
1017- Ranges : ipv6Ranges ,
1018- IsPublic : ipv6IsPublic ,
1013+ SLAAC : & ipv6SLAAC ,
1014+ Ranges : & ipv6Ranges ,
1015+ IsPublic : & ipv6IsPublic ,
10191016 },
10201017 }
10211018}
@@ -1043,10 +1040,10 @@ func constructLinodeInterfacePublic(iface infrav1alpha2.LinodeInterfaceCreateOpt
10431040 }
10441041 return & linodego.PublicInterfaceCreateOptions {
10451042 IPv4 : & linodego.PublicInterfaceIPv4CreateOptions {
1046- Addresses : ipv4Addrs ,
1043+ Addresses : & ipv4Addrs ,
10471044 },
10481045 IPv6 : & linodego.PublicInterfaceIPv6CreateOptions {
1049- Ranges : ipv6Ranges ,
1046+ Ranges : & ipv6Ranges ,
10501047 },
10511048 }
10521049}
0 commit comments