Skip to content

Commit

Permalink
Fix IPv6 detection (#1355)
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Fabry <[email protected]>
  • Loading branch information
ondrej-fabry authored May 27, 2019
1 parent d023854 commit aac8a20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/linux/ifplugin/descriptor/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func (d *InterfaceDescriptor) Create(key string, linuxIf *interfaces.Interface)
for _, ipAddress := range ipAddresses {
// Make sure sysctl "disable_ipv6" is 0 if we are about to add
// an IPv6 address to the interface
if !hasEnabledIPv6 && ipAddress.IP.To16() != nil {
if !hasEnabledIPv6 && ipAddress.IP != nil && ipAddress.IP.To4() == nil {
// Enabled IPv6 for loopback "lo" and the interface
// being configured
for _, iface := range [2]string{"lo", hostName} {
Expand Down

0 comments on commit aac8a20

Please sign in to comment.