Skip to content

Commit

Permalink
tests, multus: Fix IP address configuration
Browse files Browse the repository at this point in the history
Avoid implicit IPv6 configuration of an address and gateway.
It caused duplication to exist on the LAN.

Signed-off-by: Edward Haas <[email protected]>
  • Loading branch information
EdDev committed Dec 6, 2020
1 parent d1f5e1c commit 2e44b53
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/vmi_multus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1342,11 +1342,10 @@ func defaultCloudInitNetworkData() string {
return networkData
}

func cloudInitNetworkDataWithStaticIPsByMac(nicName, macAddress, ipv4Address string) string {
func cloudInitNetworkDataWithStaticIPsByMac(nicName, macAddress, ipAddress string) string {
networkData, err := libnet.NewNetworkData(
libnet.WithEthernet(nicName,
libnet.WithAddresses(ipv4Address, libnet.DefaultIPv6CIDR),
libnet.WithGateway6(libnet.DefaultIPv6Gateway),
libnet.WithAddresses(ipAddress),
libnet.WithNameserverFromCluster(),
libnet.WithMatchingMAC(macAddress),
),
Expand All @@ -1355,12 +1354,10 @@ func cloudInitNetworkDataWithStaticIPsByMac(nicName, macAddress, ipv4Address str
return networkData
}

func cloudInitNetworkDataWithStaticIPsByDevice(deviceName, ipv4Address string) string {
func cloudInitNetworkDataWithStaticIPsByDevice(deviceName, ipAddress string) string {
networkData, err := libnet.NewNetworkData(
libnet.WithEthernet(deviceName,
libnet.WithAddresses(ipv4Address, libnet.DefaultIPv6CIDR),
libnet.WithGateway6(libnet.DefaultIPv6Gateway),
libnet.WithAddresses(ipv4Address),
libnet.WithAddresses(ipAddress),
libnet.WithNameserverFromCluster(),
),
)
Expand Down

0 comments on commit 2e44b53

Please sign in to comment.