Browse code

d/libnet: fix CreateOptionIPAM capitalization

Signed-off-by: Albin Kerouanton <albinker@gmail.com>

Albin Kerouanton authored on 2025/08/27 07:18:46
Showing 4 changed files
... ...
@@ -1032,8 +1032,8 @@ var (
1032 1032
 	linkLocalMaskIPv6 = net.CIDRMask(64, 128)
1033 1033
 )
1034 1034
 
1035
-// CreateOptionIpam function returns an option setter for the ipam configuration for this endpoint
1036
-func CreateOptionIpam(ipV4, ipV6 net.IP, llIPs []net.IP) EndpointOption {
1035
+// CreateOptionIPAM function returns an option setter for the ipam configuration for this endpoint
1036
+func CreateOptionIPAM(ipV4, ipV6 net.IP, llIPs []net.IP) EndpointOption {
1037 1037
 	return func(ep *Endpoint) {
1038 1038
 		ep.prefAddress = ipV4
1039 1039
 		ep.prefAddressV6 = ipV6
... ...
@@ -426,7 +426,7 @@ func TestUpdateSvcRecord(t *testing.T) {
426 426
 			dnsName := "id-" + tc.epName
427 427
 			ep, err := n.CreateEndpoint(context.Background(), tc.epName,
428 428
 				CreateOptionDNSNames([]string{tc.epName, dnsName}),
429
-				CreateOptionIpam(ip4, ip6, nil),
429
+				CreateOptionIPAM(ip4, ip6, nil),
430 430
 			)
431 431
 			assert.NilError(t, err)
432 432
 
... ...
@@ -2106,7 +2106,7 @@ func (n *Network) createLoadBalancerSandbox() (retErr error) {
2106 2106
 
2107 2107
 	endpointName := n.lbEndpointName()
2108 2108
 	epOptions := []EndpointOption{
2109
-		CreateOptionIpam(n.loadBalancerIP, nil, nil),
2109
+		CreateOptionIPAM(n.loadBalancerIP, nil, nil),
2110 2110
 		CreateOptionLoadBalancer(),
2111 2111
 	}
2112 2112
 	ep, err := n.createEndpoint(context.TODO(), endpointName, epOptions...)
... ...
@@ -861,7 +861,7 @@ func buildCreateEndpointOptions(c *container.Container, n *libnetwork.Network, e
861 861
 				return nil, fmt.Errorf("invalid IPv6 address: %s", ipam.IPv6Address)
862 862
 			}
863 863
 
864
-			createOptions = append(createOptions, libnetwork.CreateOptionIpam(ip, ip6, ipList))
864
+			createOptions = append(createOptions, libnetwork.CreateOptionIPAM(ip, ip6, ipList))
865 865
 		}
866 866
 
867 867
 		createOptions = append(createOptions, libnetwork.CreateOptionDNSNames(epConfig.DNSNames))