diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-16 13:36:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-16 13:36:47 +0200 |
commit | 96fb5dc94d88bc4eafe82382bfb26b64c479f76b (patch) | |
tree | 78a831b89f1a4581884a6d520fcd1c4799210d4e /pkg/network/ip.go | |
parent | f1f1834f91c84b68f5c95dea68c9ecbbf60eb696 (diff) | |
parent | 07e3f1bba9674c0cb93a0fa260930bfebbf75728 (diff) | |
download | podman-96fb5dc94d88bc4eafe82382bfb26b64c479f76b.tar.gz podman-96fb5dc94d88bc4eafe82382bfb26b64c479f76b.tar.bz2 podman-96fb5dc94d88bc4eafe82382bfb26b64c479f76b.zip |
Merge pull request #7314 from aojea/ipv6_default_gw
IPv6 default route
Diffstat (limited to 'pkg/network/ip.go')
-rw-r--r-- | pkg/network/ip.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/network/ip.go b/pkg/network/ip.go index 1798cd939..ba93a0d05 100644 --- a/pkg/network/ip.go +++ b/pkg/network/ip.go @@ -12,3 +12,8 @@ func CalcGatewayIP(ipn *net.IPNet) net.IP { nid := ipn.IP.Mask(ipn.Mask) return ip.NextIP(nid) } + +// IsIPv6 returns if netIP is IPv6. +func IsIPv6(netIP net.IP) bool { + return netIP != nil && netIP.To4() == nil +} |