Skip to content

Commit

Permalink
Merge pull request #47 from dougbtv/remove-ip-version-requirement
Browse files Browse the repository at this point in the history
Removes requirement for version field for IPs [for release-v1.1 branch]
  • Loading branch information
s1061123 authored May 11, 2022
2 parents 37f83d1 + a57ef1f commit 4b3066b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/utils/net-attach-def.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,7 @@ func CreateNetworkStatus(r cnitypes.Result, networkName string, defaultNetwork b
}

for _, ipconfig := range result.IPs {
if ipconfig.Version == "4" && ipconfig.Address.IP.To4() != nil {
netStatus.IPs = append(netStatus.IPs, ipconfig.Address.IP.String())
}

if ipconfig.Version == "6" && ipconfig.Address.IP.To16() != nil {
netStatus.IPs = append(netStatus.IPs, ipconfig.Address.IP.String())
}
netStatus.IPs = append(netStatus.IPs, ipconfig.Address.IP.String())
}

v1dns := convertDNS(result.DNS)
Expand Down

0 comments on commit 4b3066b

Please sign in to comment.